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

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

#include <stl_extensions.hpp>

Concept definition

template<class T>
concept sl::concepts::weakly_equality_comparable = requires(const std::remove_cvref_t<T>& t)
{
{ t == t } -> std::convertible_to<bool>;
{ t != t } -> std::convertible_to<bool>;
}
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 !=.

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

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