1 // { dg-do run { target c++11 } }
4 struct A { int i; long long j; } a[64];
17 for (auto & [ x, y ] : a) // { dg-warning "structured bindings only available with" "" { target c++14_down } }
23 for (const auto [ u, v ] : a) // { dg-warning "structured bindings only available with" "" { target c++14_down } }
25 if (u != i + 2 || v != 2 * i++ + 3)
29 for (auto [ x, y ] : a) // { dg-warning "structured bindings only available with" "" { target c++14_down } }
33 if (x != i + 6 || y != 2 * i++ + 8)
37 for (const auto x : a)
39 if (x.i != i + 2 || x.j != 2 * i++ + 3)
48 for (auto & [ x, y ] : b) // { dg-warning "structured bindings only available with" "" { target c++14_down } }
54 for (const auto [ u, v ] : b) // { dg-warning "structured bindings only available with" "" { target c++14_down } }
56 if (u != i - 2 || v != 2 * i++ - 3)
60 for (auto [ x, y ] : b) // { dg-warning "structured bindings only available with" "" { target c++14_down } }
64 if (x != i - 6 || y != 2 * i++ - 8)
68 for (const auto x : b)
70 if (x.i != i - 2 || x.j != 2 * i++ - 3)
79 for (int i = 0; i < 64; i++)
81 if (a[i].i != i + 2 || a[i].j != 2 * i + 3)
85 if (b[i].i != i - 2 || b[i].j != 2 * i - 3)