diff options
Diffstat (limited to 'test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp')
-rw-r--r-- | test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp index 84841cb..c8b7def 100644 --- a/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp +++ b/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp @@ -1,10 +1,14 @@ // RUN: %clang_cc1 -fsyntax-only -verify %s namespace N { - template<class T> class X; + template<class T> class X; // expected-note {{'N::X' declared here}} \ + // expected-note {{explicitly specialized declaration is here}} } -template<> class X<int> { /* ... */ }; // expected-error {{non-template class 'X'}} +// TODO: Don't add a namespace qualifier to the template if it would trigger +// the warning about the specialization being outside of the namespace. +template<> class X<int> { /* ... */ }; // expected-error {{no template named 'X'; did you mean 'N::X'?}} \ + // expected-warning {{first declaration of class template specialization of 'X' outside namespace 'N' is a C++11 extension}} namespace N { |