aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/decomp30.C
blob: 9de3979edce38322383549366dec0bce4510b69b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// PR c++/81258
// { dg-do compile { target c++17 } }

int a[2];
auto [b, c] (a);
auto [d, e] { a };
auto [f, g] = a;
auto [h, i] ( a, a );	// { dg-error "invalid initializer for structured binding declaration" }
auto [j, k] { a, a };	// { dg-error "invalid initializer for structured binding declaration" }
auto [l, m] = { a };	// { dg-error "deducing from brace-enclosed initializer list requires" }
auto [n, o] {};		// { dg-error "invalid initializer for structured binding declaration" }
auto [p, q] ();		// { dg-error "invalid initializer for structured binding declaration" }
auto [r, s] = {};	// { dg-error "deducing from brace-enclosed initializer list requires" }
auto [t, u] = { a, a };	// { dg-error "deducing from brace-enclosed initializer list requires" }