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

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [gnu-dev/] [or1k-gcc/] [gcc/] [testsuite/] [g++.dg/] [cpp0x/] [rv-cast2.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
// Test for const_cast to reference (5.2.11/4).
2
// { dg-options -std=c++0x }
3
 
4
template  T&& xval();
5
template  T& lval();
6
template  T prval();
7
 
8
struct A { };
9
 
10
int main()
11
{
12
  const_cast(lval());
13
  const_cast(xval());   // { dg-error "" }
14
  const_cast(prval());  // { dg-error "" }
15
  const_cast(lval());
16
  const_cast(xval());
17
  const_cast(prval()); // { dg-error "" }
18
  const_cast(lval());
19
  const_cast(xval());
20
  const_cast(prval());
21
}

powered by: WebSVN 2.1.0

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