Loading...
Searching...
No Matches
bbm::concepts::backbone::ordered Concept Reference

Comparison operators: More...

#include <ordered.h>

Concept definition

template<typename T>
concept bbm::concepts::backbone::ordered = requires(T a, T b)
{
{ a == b } -> std::convertible_to<bool>;
{ a != b } -> std::convertible_to<bool>;
{ eq(a,b) };
{ neq(a,b) } -> std::same_as< decltype(eq(a,b)) >;
{ a < b } -> std::same_as< decltype(eq(a,b)) >;
{ a > b } -> std::same_as< decltype(eq(a,b)) >;
{ a <= b } -> std::same_as< decltype(eq(a,b)) >;
{ a >= b } -> std::same_as< decltype(eq(a,b)) >;
}
Comparison operators:
Definition: ordered.h:24
constexpr auto eq(T a, U b)
Definition: math.h:138
constexpr decltype(auto) b(bbm::color< T > &c)
Definition: color.h:24

Detailed Description

Comparison operators:

Requires that the type has eq, neq, <, >, <=, and => operators that each return the same type. The return type does not need to be a boolean. == and != must return a boolean.