Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp1z/decomp21.C @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children |
rev | line source |
---|---|
131 | 1 // { dg-do compile { target c++17 } } |
111 | 2 |
3 int a[3]; | |
4 struct S { int b, c, d; } s; | |
5 void | |
6 foo () | |
7 { | |
8 auto [ b, c, d ] = a; | |
9 auto [ e, f, g ] = s; | |
10 auto [ h, i, j ] { s }; | |
11 auto [ k, l, m ] { s, }; | |
12 auto [ n, o, p ] { a }; | |
13 auto [ q, r, t ] ( s ); | |
14 auto [ u, v, w ] ( s, ); // { dg-error "expected primary-expression before '.' token" } | |
15 // { dg-error "invalid initializer for structured binding declaration" "" { target *-*-* } .-1 } | |
16 auto [ x, y, z ] ( a ); | |
17 } |