2003-12-26 Guilhem Lavaux <guilhem@kaffe.org>
[official-gcc.git] / gcc / testsuite / g++.dg / template / friend9.C
blob4464e5f8ee8a816a3de24a47a374100807099d46
1 // { dg-do compile }
2 // Origin: Wolfgang Bangerth <bangerth@ticam.utexas.edu>
4 // PR c++/8099
5 // Partial specialization as friend class
7 template <int N, typename T> struct X;
8 template <typename T>        struct X<1,T>;
10 template <typename P> class Y {
11     static int i;
12     template <int N, typename T> friend struct X;
13     friend struct X<1,P>;
16 template <typename T> struct X<1,T> {
17     X () { Y<T>::i; };     // access private field