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

Checks whether a symmetrical set of operator <=> to compare both types with each other exists. More...

#include <stl_extensions.hpp>

Concept definition

template<class T1, class T2, class MinimumCategory std::partial_ordering>
&& requires(const std::remove_reference_t<T1>& t1, const std::remove_reference_t<T2>& t2)
{
{ t1 <=> t2 } -> detail::compares_as<MinimumCategory>;
{ t2 <=> t1 } -> detail::compares_as<MinimumCategory>;
}
Checks whether the given type denotes a common stl comparison category.
Definition: stl_extensions.hpp:154
Checks whether a symmetrical set of operators == and != to compare both types with each other exists.
Definition: stl_extensions.hpp:124
Checks whether a symmetrical set of operator <=> to compare both types with each other exists.
Definition: stl_extensions.hpp:242

Detailed Description

Checks whether a symmetrical set of operator <=> to compare both types with each other exists.

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

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