New test case.
From-SVN: r28674
This commit is contained in:
parent
0486d4a1b3
commit
2c5a7dc197
21
gcc/testsuite/g++.old-deja/g++.ns/template13.C
Normal file
21
gcc/testsuite/g++.old-deja/g++.ns/template13.C
Normal file
@ -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 *-*-*
|
Loading…
Reference in New Issue
Block a user