]> granicus.if.org Git - clang/commitdiff
Test explicit specialization involving multiple template<> headers
authorDouglas Gregor <dgregor@apple.com>
Mon, 12 Oct 2009 22:33:31 +0000 (22:33 +0000)
committerDouglas Gregor <dgregor@apple.com>
Mon, 12 Oct 2009 22:33:31 +0000 (22:33 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@83914 91177308-0d34-0410-b5e6-96231b3b80d8

test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp [new file with mode: 0644]

diff --git a/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp b/test/CXX/temp/temp.spec/temp.expl.spec/p17.cpp
new file mode 100644 (file)
index 0000000..883cb71
--- /dev/null
@@ -0,0 +1,12 @@
+// RUN: clang-cc -fsyntax-only -verify %s
+template<class T1> 
+class A {
+  template<class T2> class B {
+    void mf();
+  };
+};
+
+template<> template<> class A<int>::B<double>; 
+template<> template<> void A<char>::B<char>::mf();
+
+template<> void A<char>::B<int>::mf(); // expected-error{{requires 'template<>'}}