https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101485

--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
It's valid for std::byte because we know what equality means for std::byte.

You could maaaaaaybe do something like:

template<typename T>
concept is_sane_enum = is_enum_v<T> && (!requires { &operator==(E,E); });

but I'm not confident enough that it wouldn't miss some cases and allow
std::equal to do use memcmp when it shouldn't.

Reply via email to