gcc/testsuite/g++.old-deja/g++.pt/typename1.C
raw| 1 | // { dg-do assemble } |
| 2 | |
| 3 | template<class T> |
| 4 | struct A { |
| 5 | typedef T T1; |
| 6 | }; |
| 7 | |
| 8 | template<class T> |
| 9 | struct B { |
| 10 | typedef T T2; |
| 11 | }; |
| 12 | |
| 13 | template<class T> |
| 14 | struct C { |
| 15 | }; |
| 16 | |
| 17 | template<class E> |
| 18 | C<typename E::T2::T1> |
| 19 | foo (E) |
| 20 | { |
| 21 | return C<typename E::T2::T1>(); |
| 22 | } |
| 23 | |
| 24 | void test() |
| 25 | { |
| 26 | foo(B<A<int> >()); |
| 27 | } |