8sa1-gcc/gcc/testsuite/g++.old-deja/g++.jason/lookup3.C

16 lines
372 B
C++
Raw Normal View History

1997-08-19 03:34:40 -04:00
// [class.ambig]: A single function, object, type, or enumerator may be
// reached through more than one path through the DAG of base classes. This
// is not an ambiguity.
// Build don't link:
struct A {
typedef long T;
};
struct B : public A { };
struct C : public A { };
struct D : public C , public B {
void f (T&); // gets bogus error - ambiguous lookup
};