]> gcc.gnu.org Git - gcc.git/commitdiff
New test case.
authorMartin v. Löwis <loewis@gcc.gnu.org>
Wed, 11 Aug 1999 18:47:46 +0000 (18:47 +0000)
committerMartin v. Löwis <loewis@gcc.gnu.org>
Wed, 11 Aug 1999 18:47:46 +0000 (18:47 +0000)
From-SVN: r28674

gcc/testsuite/g++.old-deja/g++.ns/template13.C [new file with mode: 0644]

diff --git a/gcc/testsuite/g++.old-deja/g++.ns/template13.C b/gcc/testsuite/g++.old-deja/g++.ns/template13.C
new file mode 100644 (file)
index 0000000..e1ba30d
--- /dev/null
@@ -0,0 +1,21 @@
+// Build don't link:
+// Templates defined outside must be declared inside
+namespace bar
+{
+  template<class T>class X;
+}
+
+template <typename T>
+T const
+bar::foo(T const &a)    
+{                        // ERROR - not declared in bar - XFAIL *-*-*
+  return a;
+}
+
+template<> const int bar::foo<int>(int const &)
+{                        // ERROR - not declared in bar - XFAIL *-*-*
+  return 0;
+}
+
+template<class T,class U>
+class bar::X{};         // ERROR - does not match declaration - XFAIL *-*-*
This page took 0.067593 seconds and 5 git commands to generate.