// PR c++/84469 // { dg-do compile { target c++11 } } // { dg-options "" } struct A { template void bar () const {} template void baz () const {} }; struct B { A a; }; template void foo () { A a[1][1]; for (auto const& [b]: a) // { dg-warning "structured bindings only available with" "" { target c++14_down } } b.bar (); B c; auto const& [d] = c; // { dg-warning "structured bindings only available with" "" { target c++14_down } } d.baz (); } int main () { foo (); }