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