Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/typename4.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 };
15
16
17 template <class U>
18 struct C : public B<U>
19 {
20 A_Type Func(); // { dg-error "does not name a type" } implicit typename
21 };
22
23
24 template <class U>
25 C<U>::A_Type C<U>::Func() { // { dg-error "typename" } implicit typename
26 }