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

Checks whether a symmetrical set of operator <=> to compare both types with each other with noexcept specifier 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 } noexcept -> detail::compares_as<MinimumCategory>;
{ t2 <=> t1 } noexcept -> 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:140
Checks whether a symmetrical set of operator <=> to compare both types with each other with noexcept ...
Definition: stl_extensions.hpp:260

Detailed Description

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

This is a less restrictive version of the std::three_way_comparable_with function, but with additional noexcept check.

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.