aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/cpp1z/decomp18.C
blob: 7799e462cdd4c0c768da0f59054f519efee197c7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// { dg-do compile { target c++11 } }
// { dg-options "" }

struct A { char a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r; } a[64];

void
foo ()
{
  int z = 0;
  for (auto & [ b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s ] : a)	// { dg-warning "structured bindings only available with" "" { target c++14_down } }
    z += b + c + d + e + f + g + h + i + j + k + l + m + n + o + p + q + r + s;
}