mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-08 12:17:15 +08:00
New test case
From-SVN: r28650
This commit is contained in:
parent
d82d65d886
commit
fbb7246658
19
gcc/testsuite/g++.old-deja/g++.ns/template12.C
Normal file
19
gcc/testsuite/g++.old-deja/g++.ns/template12.C
Normal file
@ -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 <typename T>
|
||||
T const foo(T const &);
|
||||
template<> const int foo<int>(int const &);
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
T const
|
||||
bar::foo(T const &a)
|
||||
{
|
||||
return a;
|
||||
}
|
||||
|
||||
template<> const int bar::foo<int>(int const &){return 0;}
|
||||
|
Loading…
Reference in New Issue
Block a user