// CWG2635 - Constrained structured bindings // { dg-do compile { target c++20 } } // { dg-options "-pedantic" } namespace std { template struct tuple_size; template struct tuple_element; } struct A { int i; A(int x) : i(x) {} template int& get() { return i; } }; template<> struct std::tuple_size { static const int value = 2; }; template struct std::tuple_element { using type = int; }; template concept C = true; C auto [x, y] = A{1}; // { dg-warning "structured binding declaration cannot have constrained 'auto' type 'auto \\\[requires ::C<, >\\\]'" }