32 template<
typename F_TYPE,
typename S_TYPE>
76 template<u_
integer IDX>
85 template<u_
integer IDX,
typename T>
117 [[nodiscard]] std::string
className()
const override;
124 [[nodiscard]] std::string
toString(
bool enter)
const override;
128 template <
typename F_TYPE,
typename S_TYPE>
131 template <
typename F_TYPE,
typename S_TYPE>
135 template <
typename F_TYPE,
typename S_TYPE>
139 template <
typename F_TYPE,
typename S_TYPE>
141 : first_(other.first_), second_(other.second_) {}
143 template <
typename F_TYPE,
typename S_TYPE>
146 if (
this == &other)
return *
this;
147 first_ = other.first_;
148 second_ = other.second_;
152 template<
typename F_TYPE,
typename S_TYPE>
153 template<original::u_
integer IDX>
156 if constexpr (IDX == 0){
159 return this->second_;
163 template<
typename F_TYPE,
typename S_TYPE>
164 template<original::u_
integer IDX,
typename T>
167 if constexpr (IDX == 0){
169 this->first_ =
static_cast<F_TYPE
>(e);
172 this->second_ =
static_cast<S_TYPE
>(e);
176 template<
typename F_TYPE,
typename S_TYPE>
180 if (this->first_ < other.first_)
182 if (this->first_ > other.first_)
186 if (this->second_ < other.second_)
188 if (this->second_ > other.second_)
194 template <
typename F_TYPE,
typename S_TYPE>
200 template <
typename F_TYPE,
typename S_TYPE>
203 return this->second_;
206 template <
typename F_TYPE,
typename S_TYPE>
209 template <
typename F_TYPE,
typename S_TYPE>
215 template <
typename F_TYPE,
typename S_TYPE>
218 std::stringstream ss;
221 if (enter) ss <<
"\n";
Base class for comparable objects.
Definition comparable.h:31
std::string className() const override
Gets class name identifier.
Definition couple.h:210
std::string toString(bool enter) const override
Formats pair elements as string.
Definition couple.h:216
~couple() override
Default destructor.
F_TYPE & first()
Access first element.
Definition couple.h:195
S_TYPE & second()
Access second element.
Definition couple.h:201
auto get() const
element access template method
Definition couple.h:154
void set(const T &e)
element modifies the template method
Definition couple.h:165
couple & operator=(const couple &other)
Copy assignment operator.
Definition couple.h:144
couple()
Default constructs both elements.
Definition couple.h:129
integer compareTo(const couple &other) const override
Lexicographical comparison operation.
Definition couple.h:177
Exception for container index out-of-range errors.
Definition error.h:84
Base class providing polymorphic string conversion capabilities.
Definition printable.h:25
static std::string formatString(const TYPE &t)
Universal value-to-string conversion.
Compile-time error assertion utility.
Definition error.h:73
Interface for objects that can be compared.
Requires type to support all comparison operators.
Definition types.h:29
Custom exception classes and callback validation utilities.
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
Interface for polymorphic string formatting and output.
Type system foundations and concept definitions.