Could standard functions cmp_equal, cmp_not_equal, cmp_less, cmp_greater, cmp_less_equal, cmp_greater_equal be overloaded for enumerations?
 
Something like for example
 
template <typename T, typename U>
requires std::is_enum_v<T> && std::is_same_v<T, U>
constexpr bool cmp_less( T t, U u ) noexcept
{
    return std::to_underlying( t ) < std::to_underlying( u );
}
 
With best regards,
Vlad from Moscow
You can meet me at http://cpp.forum24.ru/ or www.stackoverflow.com or http://ru.stackoverflow.com