http://gcc.gnu.org/ml/gcc-patches/2008-02/msg00110.html
[official-gcc.git] / gcc / testsuite / g++.dg / tc1 / dr213.C
blob2cc70138acfaf7642e71d99aa214abe989dccf08
1 // { dg-do compile }
2 // Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
3 // DR213: Lookup in dependent base classes
5 // We should emit an error at *instantiation* time because g(t) can't be
6 //  resolved to any function.
8 template <class T> struct A : T {
9   void h(T t) {
10     f(t);
11     g(t);     // { dg-error "" "" { xfail *-*-* } }
12   }
15 struct B {
16   void f(B);
17   void g(B) {}
20 void f(B) {}
22 int main()
24   A<B> ab;   // { dg-error "" "" { xfail *-*-* } }
25   B b;
26   ab.h(b);