// RUN: %clang_cc1 -std=c++11 %s -verify // expected-no-diagnostics namespace PR15757 { struct S { }; template struct T { template T(X x, A &&a) {} template explicit T(A &&a) noexcept(noexcept(T(X(), static_cast(a)))) : T(X(), static_cast(a)) {} }; template struct U : T { using T::T; }; U foo(char ch) { return U(ch); } int main() { U a(42); U b('4'); return 0; } } namespace WrongIdent { struct A {}; struct B : A {}; struct C : B { using B::A; }; } namespace DefaultCtorConflict { struct A { A(int = 0); }; struct B : A { using A::A; } b; // ok, not ambiguous, inherited constructor suppresses implicit default constructor struct C { B b; } c; } namespace InvalidConstruction { struct A { A(int); }; struct B { B() = delete; }; struct C : A, B { using A::A; }; // Initialization here is performed as if by a defaulted default constructor, // which would be ill-formed (in the immediate context) in this case because // it would be defined as deleted. template void f(decltype(T(0))*); template int &f(...); int &r = f(0); }