URL
https://opencores.org/ocsvn/openrisc_2011-10-31/openrisc_2011-10-31/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 305 |
Rev 338 |
// { dg-do link }
|
// { dg-do link }
|
// GROUPS passed templates membertemplates
|
// GROUPS passed templates membertemplates
|
extern "C" int printf(const char*, ...);
|
extern "C" int printf(const char*, ...);
|
|
|
template
|
template
|
struct S {
|
struct S {
|
template
|
template
|
void operator+(T);
|
void operator+(T);
|
};
|
};
|
|
|
template
|
template
|
template
|
template
|
void S::operator+(T)
|
void S::operator+(T)
|
{
|
{
|
printf("Hello, world.\n");
|
printf("Hello, world.\n");
|
}
|
}
|
|
|
|
|
int main()
|
int main()
|
{
|
{
|
S s;
|
S s;
|
s + 3;
|
s + 3;
|
s + s;
|
s + s;
|
s.operator+("Hi");
|
s.operator+("Hi");
|
|
|
S > s2;
|
S > s2;
|
s2 + 3;
|
s2 + 3;
|
s2 + s;
|
s2 + s;
|
s2.operator+("Hi");
|
s2.operator+("Hi");
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.