// DR 2303 // PR c++/97453 // { dg-do compile { target c++11 } } template struct A; template <> struct A<> { }; template struct A : A { }; struct B : A { }; struct C : A, A // { dg-warning "direct base .A. inaccessible in .C. due to ambiguity" } { }; struct D : A, A // { dg-warning "direct base .A. inaccessible in .D. due to ambiguity" } { }; template void f (const A &) { static_assert (sizeof...(T) == 2, "it should duduce to A"); } void g () { f (B{}); f (C{}); f (D{}); }