1 // PR c++/85194 2 // { dg-do compile { target c++11 } } 3 // { dg-options "" } 4 5 struct A { int i; }; 6 7 A x[2]; 8 9 void foo()10foo () 11 { 12 for (auto [i] = A () : x) // { dg-error "initializer in range-based 'for' loop" } 13 ; // { dg-warning "structured bindings only available with" "" { target c++14_down } .-1 } 14 } 15