OSDN Git Service

PR c++/28878
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / access9.C
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
11 template <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);