30template <
typename DERIVED>
54 template<
typename EXTENDED>
55 friend std::strong_ordering
operator<=>(
const EXTENDED& lc,
const EXTENDED& rc);
107template<
typename EXTENDED>
108std::strong_ordering
operator<=>(
const EXTENDED& lc,
const EXTENDED& rc) {
109 return lc.compareTo(rc) <=> 0;
112template<
typename DERIVED>
117template<
typename DERIVED>
122template<
typename DERIVED>
127template<
typename DERIVED>
132template<
typename DERIVED>
137template<
typename DERIVED>
Base class for comparable objects.
Definition comparable.h:31
bool operator<=(const DERIVED &other) const
Checks if the current object is less than or equal to another.
Definition comparable.h:133
bool operator!=(const DERIVED &other) const
Checks if the current object is not equal to another.
Definition comparable.h:118
bool operator>=(const DERIVED &other) const
Checks if the current object is greater than or equal to another.
Definition comparable.h:138
virtual integer compareTo(const DERIVED &other) const =0
Compares the current object with another of the same type.
friend std::strong_ordering operator<=>(const EXTENDED &lc, const EXTENDED &rc)
Three-way comparison operator (<=>), returns an ordered comparison result.
Definition comparable.h:108
bool operator==(const DERIVED &other) const
Checks if the current object is equal to another.
Definition comparable.h:113
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:128
bool operator<(const DERIVED &other) const
Checks if the current object is less than another.
Definition comparable.h:123
Platform-independent integer type definitions.
Main namespace for the project Original.
Definition algorithms.h:21
std::int64_t integer
64-bit signed integer type for arithmetic operations
Definition config.h:15
std::strong_ordering operator<=>(const EXTENDED &lc, const EXTENDED &rc)
Definition comparable.h:108