// RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s template struct A { void f() { } struct N { }; // expected-note{{target of using declaration}} }; template struct B : A { using A::f; using A::N; // expected-error{{dependent using declaration resolved to type without 'typename'}} using A::foo; // expected-error{{no member named 'foo'}} using A::f; // expected-error{{using declaration refers into 'A::', which is not a base class of 'B'}} }; B a; // expected-note{{in instantiation of template class 'B' requested here}} template struct C : A { using A::f; void f() { }; }; template struct D : A { using A::f; void f(); }; template void D::f() { } template struct E : A { using A::f; void g() { f(); } }; namespace test0 { struct Base { int foo; }; template struct E : Base { using Base::foo; }; template struct E; } // PR7896 namespace PR7896 { template struct Foo { int k (float); }; struct Baz { int k (int); }; template struct Bar : public Foo, Baz { using Foo::k; using Baz::k; int foo() { return k (1.0f); } }; template int Bar::foo(); } // PR10883 namespace PR10883 { template class Base { public: typedef long Container; }; template class Derived : public Base { public: using Base::Container; void foo(const Container& current); // expected-error {{unknown type name 'Container'}} }; } template class UsingTypenameNNS { using typename T::X; typename X::X x; }; namespace aliastemplateinst { template struct A { }; template using APtr = A; // expected-note{{previous use is here}} template struct APtr; // expected-error{{elaborated type refers to a type alias template}} }