summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-11 18:47:46 +0000
committerloewis <loewis@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-11 18:47:46 +0000
commit5045c2ee46041cf3e19a45ef6efcd804869d8c08 (patch)
tree2d577bd81ca79f4be6736a4aa80de3d12621d0fd
parentd9b7c1cdfd1e257145d91727096935ac5489cac1 (diff)
downloadppe42-gcc-5045c2ee46041cf3e19a45ef6efcd804869d8c08.tar.gz
ppe42-gcc-5045c2ee46041cf3e19a45ef6efcd804869d8c08.zip
New test case.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@28674 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/testsuite/g++.old-deja/g++.ns/template13.C21
1 files changed, 21 insertions, 0 deletions
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
index 00000000000..e1ba30d0328
--- /dev/null
+++ b/gcc/testsuite/g++.old-deja/g++.ns/template13.C
@@ -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 *-*-*
OpenPOWER on IntegriCloud