ipa-cp: Perform operations in the appropriate types (PR 118097)
[gcc.git] / gcc / testsuite / g++.dg / template / friend63.C
blobf3a292c3fd3a2c8737c227a33c52020c1fefd1d6
1 // PR c++/71738
3 template < class > struct S
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   };
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);
21 private:
22   static int i;
25 int main()
27   S<int>::A<int>::B<int> b;
28   b = 0;