gcc/testsuite/g++.dg/template/dependent-base4.C
raw| 1 | // PR c++/117993 |
| 2 | |
| 3 | template<class T> |
| 4 | struct A { |
| 5 | void f(); |
| 6 | typedef void type; |
| 7 | }; |
| 8 | |
| 9 | template<class T> |
| 10 | struct B : A<T> { |
| 11 | template<class U> struct C; |
| 12 | }; |
| 13 | |
| 14 | template<class T> |
| 15 | template<class U> |
| 16 | struct B<T>::C : B { |
| 17 | void g(C& c) { |
| 18 | this->f(); // { dg-bogus "member" } |
| 19 | c.f(); // { dg-bogus "member" } |
| 20 | C::f(); // { dg-bogus "member" } |
| 21 | typename C::type* p; // { dg-bogus "not name a type" } |
| 22 | } |
| 23 | }; |