comparison gcc/testsuite/g++.dg/cpp1z/decomp21.C @ 111:04ced10e8804

gcc 7
author kono
date Fri, 27 Oct 2017 22:46:09 +0900
parents
children 84e7813d76e9
comparison
equal deleted inserted replaced
68:561a7518be6b 111:04ced10e8804
1 // { dg-options -std=c++17 }
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 }