OSDN Git Service

/cp
[pf3gnuchains/gcc-fork.git] / gcc / testsuite / g++.dg / template / friend19.C
1 // { dg-do compile }
2
3 // Origin: Benjamin Li <benxbli@yahoo.com>
4
5 // PR c++/11030: Template substitution of friend class that is
6 // a specialization.
7
8 template <int S>
9 struct A
10 {
11   void func(void);
12 };
13
14 template <class T>
15 class C
16 {
17   static void private_func(void) {}
18 public:
19   friend class A<512>;
20 };
21
22 template <int S>
23 void A<S>::func(void)
24 {
25   C<void>::private_func();
26 }
27
28 template class A<512>;