Debian Codegraph @

gcc/testsuite/g++.dg/lookup/koenig12.C

raw
1 // PR c++/41305
2 // We got into infinite recursion instantiating the B<U> series.
3
4 template <class T> struct A { };
5 template <class T, class U = A<T> > struct B;
6 template <class T> struct C { };
7
8 template <class T, class U> struct B: C<B<U> >
9 {
10 friend void f(B) { }
11 };
12
13 B<int> b;
14
15 int main()
16 {
17 f(b);
18 }