Debian Codegraph @

gcc/testsuite/g++.old-deja/g++.pt/typename7.C

raw
1 // { dg-do assemble }
2 // { dg-options "" }
3 // Test for implicit typename
4
5 template <class T>
6 struct A {
7 protected:
8 typedef struct B { } B;
9 };
10
11 template <class T>
12 struct C { };
13
14 template <class T>
15 struct D : public A <C <T> > {
16 void f ()
17 {
18 B* new_entries = (B *) 0; // { dg-error "'B' was not declared in this scope" "B" }
19 // { dg-error "'new_entries' was not declared in this scope" "new_entries" { target *-*-* } .-1 }
20 // { dg-error "expected" "exp" { target *-*-* } .-2 }
21 }
22 };