URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Go to most recent revision |
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 384 |
// { dg-do compile }
|
// { dg-do compile }
|
// Templates defined outside must be declared inside
|
// Templates defined outside must be declared inside
|
namespace bar
|
namespace bar
|
{
|
{
|
// trick it to provide some prior declaration
|
// trick it to provide some prior declaration
|
template
|
template
|
void foo(); // { dg-error "definition" }
|
void foo(); // { dg-error "definition" }
|
templateclass X; // { dg-message "note: previous declaration" }
|
templateclass X; // { dg-message "note: previous declaration" }
|
}
|
}
|
|
|
template
|
template
|
T const
|
T const
|
bar::foo(T const &a) // { dg-error "" "" { xfail *-*-* } } not declared in bar -
|
bar::foo(T const &a) // { dg-error "" "" { xfail *-*-* } } not declared in bar -
|
{
|
{
|
return a;
|
return a;
|
}
|
}
|
|
|
template<> void bar::foo() // { dg-error "different namespace" }
|
template<> void bar::foo() // { dg-error "different namespace" }
|
{
|
{
|
}
|
}
|
|
|
template
|
template
|
class bar::X{}; // { dg-error "redeclared with 2 template parameter" }
|
class bar::X{}; // { dg-error "redeclared with 2 template parameter" }
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.