blob: 15438517be0f31bfd91182cc16557198d031e93c [file] [log] [blame]
// { 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-message "" }
}
};
struct B {
void f(B);
void g(B) {}
};
void f(B) {}
int main()
{
A<B> ab;
B b;
ab.h(b); // { dg-message "required" }
}