gcc/testsuite/g++.dg/template/dependent-name10.C
raw| 1 | // PR c++/94057 - template keyword in a typename-specifier. |
| 2 | // { dg-do compile { target c++11 } } |
| 3 | |
| 4 | template<typename T> struct A { |
| 5 | template<typename U> struct B { |
| 6 | typedef int TT; |
| 7 | typedef int TT2; |
| 8 | typedef int TT3; |
| 9 | typedef int TT4; |
| 10 | }; |
| 11 | }; |
| 12 | |
| 13 | struct X : A<int>::B<int> { |
| 14 | using A<int>::template B<int>::TT; |
| 15 | using typename A<int>::template B<int>::TT2; |
| 16 | using A<int>::B<int>::TT3; |
| 17 | using typename A<int>::B<int>::TT4; |
| 18 | }; |