URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Subversion Repositories openrisc_2011-10-31
[/] [openrisc/] [trunk/] [gnu-src/] [gcc-4.2.2/] [gcc/] [testsuite/] [g++.dg/] [tc1/] [dr213.C] - Rev 154
Compare with Previous | Blame | View Log
// { dg-do compile }
// Origin: Giovanni Bajo <giovannibajo at gcc dot gnu dot org>
// DR213: Lookup in dependent base classes
// We should emit an error at *instantiation* time because g(t) can't be
// resolved to any function.
template <class T> struct A : T {
void h(T t) {
f(t);
g(t); // { dg-error "" "" { xfail *-*-* } }
}
};
struct B {
void f(B);
void g(B) {};
};
void f(B) {}
int main()
{
A<B> ab; // { dg-error "" "" { xfail *-*-* } }
B b;
ab.h(b);
}