summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/tc1/dr213.C
blob: 2cc70138acfaf7642e71d99aa214abe989dccf08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// { 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);
}