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>
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
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
-
T | The type to check. |
MinimumCategory | The minimum category the comparison has to yield. |