// PR c++/80370 // { dg-do compile { target c++14 } } // { dg-options "" } namespace std { template struct tuple_size; template struct tuple_element; template struct tuple {}; template struct tuple_size> { static constexpr int value = 1; }; template struct tuple_element<0, tuple> { typedef T type; }; template int& get (tuple); } template void foo (std::tuple b) { auto [c] = b; // { dg-warning "structured bindings only available with" "" { target c++14_down } } } template void bar (std::tuple b) { auto [c] = b; // { dg-warning "structured bindings only available with" "" { target c++14_down } } } void baz (std::tuple b) { foo <5> (b); bar (b); } int main () { [](auto) { [](std::tuple b) { auto[c] = b; }; } (0); // { dg-warning "structured bindings only available with" "" { target c++14_down } } }