[PR c++/84702] ICE with default tmpl arg of overload set
[official-gcc.git] / gcc / testsuite / g++.dg / template / typedef24.C
blobddcae1d61e0785f2a95899fabd58ba1edc59fb96
1 // Contributed by Dodji Seketeli <dodji@redhat.com>
2 // Origin PR c++/42225
3 // { dg-do compile }
5 template<class T>
6 struct A
8     typedef T I;
9 };
11 template<class T, int>
12 struct B
14     typedef T TT;
15     typedef typename TT::I TT_I;
16     typedef A<TT_I> TA;
19 template<class T>
20 void
21 foo()
23     typedef T TT;
24     typedef typename TT::I TT_I;
25     typedef A<TT_I> TA;
28 int
29 main()
31     foo<A<int> >();