1 // Copyright (C) 2003 Free Software Foundation 2 // Contributed by Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> 3 // { dg-do compile } 4 5 // Template instantiate during deferred access check 6 7 template <void (*)(int)> struct C { 8 typedef int Y; 9 }; 10 f(typename T::X)11template <class T> void f(typename T::X) { 12 } 13 14 class A { 15 typedef int X; 16 template <class T> friend void f(typename T::X); 17 }; 18 19 C<&f<A> >::Y g(int); 20