gcc/testsuite/g++.dg/template/nested1.C
raw| 1 | /* PR c++/4633 */ |
| 2 | /* { dg-do compile } */ |
| 3 | |
| 4 | // The 'class X' inside the template used to escape (somehow), |
| 5 | // so that the typedef claimed that it was redefining X. |
| 6 | |
| 7 | template <typename T> struct S ; |
| 8 | |
| 9 | template <> struct S<float> |
| 10 | { |
| 11 | template <class, class> struct R; |
| 12 | template <class X> struct R<X, X> { }; |
| 13 | |
| 14 | typedef int X; |
| 15 | }; |