// PR c++/123667 // { dg-do compile { target c++11 } } // { dg-options "" } namespace std { template struct tuple_size; template struct tuple_element; } struct A { int i; template int &get () { return i; } }; template <> struct std::tuple_size { static const int value = 2; }; template struct std::tuple_element { using type = int; }; auto [ x, y ] = A { 0 }; // { dg-warning "structured bindings only available with" "" { target c++14_down } } template void foo () { using a = decltype (x); auto [ x, y ] = A { 0 }; // { dg-warning "structured bindings only available with" "" { target c++14_down } } using b = decltype (x); } void bar () { foo <42> (); }