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

Checks whether the given type is comparable via operator == and != and has noexcept specifier. More...

#include <stl_extensions.hpp>

Concept definition

template<class T>
&& requires(const std::remove_cvref_t<T>& t)
{
{ t == t } noexcept -> std::convertible_to<bool>;
{ t != t } noexcept -> std::convertible_to<bool>;
}
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 via operator == and !=.
Definition: stl_extensions.hpp:96

Detailed Description

Checks whether the given type is comparable via operator == and != and has noexcept specifier.

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

See also
https://en.cppreference.com/w/cpp/concepts/equality_comparable
Template Parameters
TThe type to check.