2 // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3 // DR176: Name injection and templates
6 template <class T> struct Base {
9 ::Base* p3; // { dg-error "" "" }
12 template <class T> struct Derived: public Base<T> {
13 Base* p; // { dg-error "" "unqualified name binds to N1::Base" }
15 typename Derived::Base* p3; // { dg-bogus "" "injected class name in derived classes" }
18 template struct Derived<void>; // { dg-bogus "instantiated from here" "everything should be looked up at parsing time (after DR224)" }
23 template <class T> struct Base {};
24 template <class T> struct Derived: public Base<T> {
25 typename Derived::template Base<double>* p1; // { dg-bogus "" "" }
28 template struct Derived<void>;