URL
https://opencores.org/ocsvn/openrisc/openrisc/trunk
Only display areas with differences |
Details |
Blame |
View Log
Rev 301 |
Rev 338 |
// I, Howard Hinnant, hereby place this code in the public domain.
|
// I, Howard Hinnant, hereby place this code in the public domain.
|
|
|
// Test cast from lvalue to rvalue
|
// Test cast from lvalue to rvalue
|
|
|
// { dg-do compile }
|
// { dg-do compile }
|
// { dg-options "-std=c++0x" }
|
// { dg-options "-std=c++0x" }
|
|
|
template struct sa;
|
template struct sa;
|
template <> struct sa {};
|
template <> struct sa {};
|
|
|
struct one {char x[1];};
|
struct one {char x[1];};
|
struct two {char x[2];};
|
struct two {char x[2];};
|
|
|
struct A {};
|
struct A {};
|
|
|
one foo(const A&) {return one();}
|
one foo(const A&) {return one();}
|
two foo(A&&) {return two();}
|
two foo(A&&) {return two();}
|
|
|
int test1()
|
int test1()
|
{
|
{
|
A a;
|
A a;
|
sa t1;
|
sa t1;
|
sa(a))) == 2> t2;
|
sa(a))) == 2> t2;
|
return 0;
|
return 0;
|
}
|
}
|
|
|
int main()
|
int main()
|
{
|
{
|
return test1();
|
return test1();
|
}
|
}
|
|
|
© copyright 1999-2024
OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.