gcc/testsuite/g++.dg/parse/tmpl-outside2.C
raw| 1 | // PR c++/50080 |
| 2 | |
| 3 | template <typename T> |
| 4 | struct A |
| 5 | { |
| 6 | template <typename U> |
| 7 | struct B {}; |
| 8 | }; |
| 9 | |
| 10 | template <typename T> |
| 11 | void test() |
| 12 | { |
| 13 | typename A<T>::template B<int> b; |
| 14 | } |
| 15 | |
| 16 | int main() |
| 17 | { |
| 18 | typename A<double>::template B<int> b; // { dg-error "template|expected" "" { target { ! c++11 } } } |
| 19 | } |