// Copyright (C) 2003 Free Software Foundation // Contributed by Kriang Lerdsuwanakij // { dg-do compile } // Template instantiate during deferred access check template struct C { typedef typename T::X Y; }; class A { typedef int X; template friend struct C; }; C::Y f(int);