Simple-Utility v2.3.1
Loading...
Searching...
No Matches
sl::concepts::weakly_three_way_comparable Concept Reference

Checks whether the given type is comparable <=> with the minimal comparison category. This also implies equality comparable. More...

#include <stl_extensions.hpp>

Concept definition

template<class T, class MinimumCategory std::partial_ordering>
&& requires(const std::remove_reference_t<T>& t)
{
{ t <=> t } -> detail::compares_as<MinimumCategory>;
}
Checks whether the given type denotes a common stl comparison category.
Definition: stl_extensions.hpp:154
Checks whether the given type is comparable via operator == and !=.
Definition: stl_extensions.hpp:96
Checks whether the given type is comparable <=> with the minimal comparison category....
Definition: stl_extensions.hpp:210

Detailed Description

Checks whether the given type is comparable <=> with the minimal comparison category. This also implies equality comparable.

This is a less restrictive version of the std::three_way_comparable function.

See also
https://en.cppreference.com/w/cpp/utility/compare/three_way_comparable
Template Parameters
TThe type to check.
MinimumCategoryThe minimum category the comparison has to yield.