From: Martin v. Löwis Date: Tue, 10 Aug 1999 16:59:59 +0000 (+0000) Subject: New test case X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=fbb72466580f54d1b43a42d9845107e488627241;p=gcc.git New test case From-SVN: r28650 --- diff --git a/gcc/testsuite/g++.old-deja/g++.ns/template12.C b/gcc/testsuite/g++.old-deja/g++.ns/template12.C new file mode 100644 index 00000000000..5a6869cb4e1 --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.ns/template12.C @@ -0,0 +1,19 @@ +// Build don't link: +// Templates can be defined outside of the namespace if the have been declared +// inside +namespace bar +{ + template + T const foo(T const &); + template<> const int foo(int const &); +} + +template +T const +bar::foo(T const &a) +{ + return a; +} + +template<> const int bar::foo(int const &){return 0;} +