PR c++/81917 - ICE with void_t and partial specialization.
[official-gcc.git] / gcc / testsuite / g++.dg / template / friend9.C
blobadd5fb0d344d84cb12631a3e9d806109e9dd0100
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