OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [cast.C] - Blame information for rev 774

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 693 jeremybenn
// I, Howard Hinnant, hereby place this code in the public domain.
2
 
3
// Test cast from lvalue to rvalue
4
 
5
// { dg-do compile }
6
// { dg-options "-std=c++0x" }
7
 
8
template  struct sa;
9
template <> struct sa {};
10
 
11
struct one   {long x[1];};
12
struct two   {long x[2];};
13
 
14
struct A {};
15
 
16
one foo(const A&) {return one();}
17
two foo(A&&)      {return two();}
18
 
19
int test1()
20
{
21
    A a;
22
    sa t1;
23
    sa(a))) == 2 * sizeof(long)> t2;
24
    return 0;
25
}
26
 
27
int main()
28
{
29
    return test1();
30
}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.