diff options
Diffstat (limited to 'test/SemaCXX/using-decl-templates.cpp')
-rw-r--r-- | test/SemaCXX/using-decl-templates.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/test/SemaCXX/using-decl-templates.cpp b/test/SemaCXX/using-decl-templates.cpp index 684009b..a19223d 100644 --- a/test/SemaCXX/using-decl-templates.cpp +++ b/test/SemaCXX/using-decl-templates.cpp @@ -10,7 +10,7 @@ template<typename T> struct B : A<T> { using A<T>::N; // expected-error{{dependent using declaration resolved to type without 'typename'}} using A<T>::foo; // expected-error{{no member named 'foo'}} - using A<double>::f; // expected-error{{using declaration refers into 'A<double>::', which is not a base class of 'B'}} + using A<double>::f; // expected-error{{using declaration refers into 'A<double>::', which is not a base class of 'B<int>'}} }; B<int> a; // expected-note{{in instantiation of template class 'struct B<int>' requested here}} @@ -34,3 +34,14 @@ template<typename T> struct E : A<T> { void g() { f(); } }; + +namespace test0 { + struct Base { + int foo; + }; + template<typename T> struct E : Base { + using Base::foo; + }; + + template struct E<int>; +} |