From: Martin v. Löwis Date: Wed, 11 Aug 1999 18:47:46 +0000 (+0000) Subject: New test case. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=2c5a7dc197e96453a07d2e00dc88fe4ec2b5e862;p=gcc.git New test case. From-SVN: r28674 --- 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 +{ + templateclass X; +} + +template +T const +bar::foo(T const &a) +{ // ERROR - not declared in bar - XFAIL *-*-* + return a; +} + +template<> const int bar::foo(int const &) +{ // ERROR - not declared in bar - XFAIL *-*-* + return 0; +} + +template +class bar::X{}; // ERROR - does not match declaration - XFAIL *-*-*