using-decl-templates.cpp revision 36ef0787532ef3ecfc8ecd5e9661f5b2f87a280f
1// RUN: clang-cc -fsyntax-only -verify %s 2 3template<typename T> struct A { 4 void f() { } 5 struct N { }; 6}; 7 8template<typename T> struct B : A<T> { 9 using A<T>::f; 10 using A<T>::N; 11 12 using A<T>::foo; // expected-error{{no member named 'foo'}} 13 using A<double>::f; // expected-error{{using declaration refers into 'A<double>::', which is not a base class of 'B'}} 14}; 15 16B<int> a; // expected-note{{in instantiation of template class 'struct B<int>' requested here}} 17 18template<typename T> struct C : A<T> { 19 using A<T>::f; 20 21 void f() { }; 22}; 23