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

Checks whether the given type is comparable <=> with the minimal comparison category and noexcept specifier. 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 } noexcept -> 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 != and has noexcept specifier.
Definition: stl_extensions.hpp:109
Checks whether the given type is comparable <=> with the minimal comparison category and noexcept spe...
Definition: stl_extensions.hpp:226

Detailed Description

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

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

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.