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

Subversion Repositories openrisc

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

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

Line No. Rev Author Line
1 693 jeremybenn
// Core issue 934
2
// { dg-options "-std=c++0x" }
3
 
4
int i;
5
 
6
int& r1{ i };                    // OK, direct binding
7
int&& r2{ i };                    // { dg-error "" } binding && to lvalue
8
 
9
int& r3{ };                    // { dg-error "" } reference to temporary
10
int&& r4{ };                    // OK, reference to temporary
11
 
12
struct A { int i; } a;
13
 
14
A& r5 { i };                      // { dg-error "" } reference to temporary
15
A&& r6 { i };                      // OK, aggregate initialization of temporary
16
A& r7 { a };                      // { dg-error "" } invalid aggregate initializer for A
17
A&& r8 { a };                      // { dg-error "" } invalid aggregate initializer for A
18
 
19
struct B { B(int); int i; } b(0);
20
 
21
B& r9 { i };                      // { dg-error "" } reference to temporary
22
B&& r10 { i };                      // OK, make temporary with B(int) constructor
23
B& r11 { b };                      // { dg-error "" } reference to temporary
24
B&& r12 { b };                      // OK, make temporary with copy constructor

powered by: WebSVN 2.1.0

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