31template <
typename DERIVED>
55 template<
typename EXTENDED>
57 friend std::strong_ordering
operator<=>(
const EXTENDED& lc,
const EXTENDED& rc);
109template<
typename EXTENDED>
111std::strong_ordering
operator<=>(
const EXTENDED& lc,
const EXTENDED& rc) {
112 return lc.compareTo(rc) <=> 0;
115template<
typename DERIVED>
117 return compareTo(other) == 0;
120template<
typename DERIVED>
122 return compareTo(other) != 0;
125template<
typename DERIVED>
127 return compareTo(other) < 0;
130template<
typename DERIVED>
132 return compareTo(other) > 0;
135template<
typename DERIVED>
137 return compareTo(other) <= 0;
140template<
typename DERIVED>
142 return compareTo(other) >= 0;
Base class for comparable objects.
Definition comparable.h:32
bool operator<=(const DERIVED &other) const
Checks if the current object is less than or equal to another.
Definition comparable.h:136
bool operator!=(const DERIVED &other) const
Checks if the current object is not equal to another.
Definition comparable.h:121
bool operator>=(const DERIVED &other) const
Checks if the current object is greater than or equal to another.
Definition comparable.h:141
virtual integer compareTo(const DERIVED &other) const =0
Compares the current object with another of the same type.
bool operator==(const DERIVED &other) const
Checks if the current object is equal to another.
Definition comparable.h:116
virtual ~comparable()=default
Virtual destructor for proper cleanup of derived objects.
bool operator>(const DERIVED &other) const
Checks if the current object is greater than another.
Definition comparable.h:131
bool operator<(const DERIVED &other) const
Checks if the current object is less than another.
Definition comparable.h:126
friend std::strong_ordering operator<=>(const EXTENDED &lc, const EXTENDED &rc)
Three-way comparison operator (<=>), returns an ordered comparison result.
Definition comparable.h:111
Checks derivation or type identity using std::derived_from.
Definition types.h:393
Platform-independent type definitions and compiler/platform detection.
std::int64_t integer
64-bit signed integer type for arithmetic operations
Definition config.h:254
Main namespace for the project Original.
Definition algorithms.h:21
std::strong_ordering operator<=>(const EXTENDED &lc, const EXTENDED &rc)
Definition comparable.h:111
Core type system foundations and concept definitions.