* decl.c (make_typename_type): s/parameters/arguments/.
[official-gcc.git] / gcc / testsuite / g++.dg / cpp0x / initlist22.C
blob0cbfe24a4a765c9c188374ceada68cb3338495dd
1 // Core issue 934/1288
2 // { dg-do compile { target c++11 } }
4 int i;
6 int& r1{ i };                   // OK, direct binding
7 int&& r2{ i };                  // { dg-error "" } binding && to lvalue
9 int& r3{ };                     // { dg-error "" } reference to temporary
10 int&& r4{ };                    // OK, reference to temporary
12 struct A { int i; } a;
14 A& r5 { i };                    // { dg-error "" } reference to temporary
15 A&& r6 { i };                   // OK, aggregate initialization of temporary
16 A& r7 { a };                    // OK, direct-initialization
17 A&& r8 { a };                   // { dg-error "lvalue" } binding && to lvalue
19 struct B { B(int); int i; } b(0);
21 B& r9 { i };                    // { dg-error "" } reference to temporary
22 B&& r10 { i };                  // OK, make temporary with B(int) constructor
23 B& r11 { b };                   // OK, direct-initialization
24 B&& r12 { b };                  // { dg-error "lvalue" } binding && to lvalue