https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67324
Casey Carter <Casey at Carter dot net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |Casey at Carter dot net --- Comment #1 from Casey Carter <Casey at Carter dot net> --- > template< class T, class U = T > > concept bool > Assignable( ) > { > return > requires( T&& a, U&& b ) { > //{ forward<T>(a) = forward<U>(b) } -> Same<T&>; // #1 > //Same<T&, decltype(forward<T>(a) = forward<U>(b))>(); // #2 > }; > } #2 is an expression constraint requiring "Same<...>()" to be a valid expression. It notably does NOT require "Same<...>()" to be satisfied. You need a nested-requirement to express this: template< class T, class U = T > concept bool Assignable() { return requires( T&& a, U&& b ) { requires Same<T&, decltype(forward<T>(a) = forward<U>(b))>(); }; }