gcc/testsuite/g++.dg/diagnostic/missing-typename.C
raw| 1 | // fix-it hint for missing "typename" (PR c++/63392) |
| 2 | // { dg-do compile { target c++17_down } } |
| 3 | // { dg-options "-fdiagnostics-show-caret" } |
| 4 | |
| 5 | template<typename T> |
| 6 | class test_1 { |
| 7 | T::type x; // { dg-error "need 'typename' before 'T::type' because 'T' is a dependent scope" } |
| 8 | /* { dg-begin-multiline-output "" } |
| 9 | T::type x; |
| 10 | ^ |
| 11 | typename |
| 12 | { dg-end-multiline-output "" } */ |
| 13 | }; |