diff options
Diffstat (limited to 'clang/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp')
-rw-r--r-- | clang/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp b/clang/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp new file mode 100644 index 0000000..84841cb --- /dev/null +++ b/clang/test/CXX/temp/temp.spec/temp.expl.spec/p3.cpp @@ -0,0 +1,13 @@ +// RUN: %clang_cc1 -fsyntax-only -verify %s + +namespace N { + template<class T> class X; +} + +template<> class X<int> { /* ... */ }; // expected-error {{non-template class 'X'}} + +namespace N { + +template<> class X<char*> { /* ... */ }; // OK: X is a template + +} |