Mercurial > hg > CbC > CbC_gcc
annotate gcc/testsuite/g++.dg/cpp1z/decomp21.C @ 158:494b0b89df80 default tip
...
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 25 May 2020 18:13:55 +0900 |
parents | 84e7813d76e9 |
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 } |