gcc/testsuite/g++.old-deja/g++.pt/typename3.C
raw| 1 | // { dg-do assemble } |
| 2 | // { dg-options "-Wno-deprecated" } |
| 3 | |
| 4 | template <class T> |
| 5 | struct A |
| 6 | { |
| 7 | typedef T A_Type; |
| 8 | }; |
| 9 | |
| 10 | |
| 11 | template <class U> |
| 12 | struct B : public A<U> |
| 13 | { |
| 14 | A_Type Func(); // { dg-error "does not name a type" "err" } implicit typename |
| 15 | // { dg-message "note" "note" { target *-*-* } .-1 } |
| 16 | }; |
| 17 | |
| 18 | |
| 19 | template <class U> |
| 20 | B<U>::A_Type B<U>::Func() { // { dg-error "typename" } implicit typename |
| 21 | } |