gcc/testsuite/g++.old-deja/g++.pt/typename21.C
raw| 1 | // { dg-do assemble } |
| 2 | // { dg-options "" } |
| 3 | // Origin: Mark Mitchell <[email protected]> |
| 4 | |
| 5 | template <class T> |
| 6 | struct S1 { |
| 7 | typedef T X; |
| 8 | }; |
| 9 | |
| 10 | template <class T> |
| 11 | struct B { |
| 12 | typedef T I; |
| 13 | }; |
| 14 | |
| 15 | template <class T> |
| 16 | struct S2 : public B<T> { |
| 17 | struct I {}; |
| 18 | |
| 19 | typedef typename S1<I>::X IX; |
| 20 | |
| 21 | void f(IX); |
| 22 | }; |
| 23 | |
| 24 | template <class T> |
| 25 | void S2<T>::f(IX) {} |