comparison gcc/testsuite/g++.dg/template/friend63.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 // PR c++/71738
2
3 template < class > struct S
4 {
5 template < class > struct A
6 {
7 template < class > struct B
8 {
9 template <class Z>
10 void operator=(Z) { S::i = 0; }
11 };
12 };
13
14 // Note that this friend declaration is useless, since nested classes are
15 // already friends of their enclosing class.
16 template < class X >
17 template < class Y >
18 template < class Z >
19 friend void A < X >::B < Y >::operator= (Z);
20
21 private:
22 static int i;
23 };
24
25 int main()
26 {
27 S<int>::A<int>::B<int> b;
28 b = 0;
29 }