StormByte 2.0.0
C++26 foundation of the StormByte suite
 
Loading...
Searching...
No Matches
StormByte::Type::EqualityComparable Concept Reference

Type whose == and != both yield something convertible to bool. More...

#include <StormByte/type_traits/comparison.hxx>

Concept definition

template<typename T>
requires(std::remove_cvref_t<T> const& a, std::remove_cvref_t<T> const& b) {
{ a == b } -> std::convertible_to<bool>;
{ a != b } -> std::convertible_to<bool>;
}
Type whose == and != both yield something convertible to bool.
Definition comparison.hxx:81

Detailed Description

Type whose == and != both yield something convertible to bool.

Template Parameters
TType to test.

Not std::equality_comparable: this only checks same-type comparison, not the mixed-type / common-reference machinery.

template<Type::EqualityComparable T>
bool same(T const& a, T const& b) { return a == b; }