8 template<
typename F_TYPE,
typename S_TYPE>
15 couple(F_TYPE* first, S_TYPE* second);
16 couple(
const F_TYPE& first,
const S_TYPE& second);
17 couple(
const couple& other);
18 couple& operator=(
const couple& other);
19 bool operator==(
const couple& other)
const;
23 [[nodiscard]] std::string className()
const override;
24 [[nodiscard]] std::string toString(
bool enter)
const override;
28 template <
typename F_TYPE,
typename S_TYPE>
29 original::couple<F_TYPE, S_TYPE>::couple() : first_(), second_() {}
31 template <
typename F_TYPE,
typename S_TYPE>
32 original::couple<F_TYPE, S_TYPE>::couple(F_TYPE* first, S_TYPE* second)
33 : first_(*first), second_(*second) {}
35 template <
typename F_TYPE,
typename S_TYPE>
36 original::couple<F_TYPE, S_TYPE>::couple(
const F_TYPE& first,
const S_TYPE& second)
37 : first_(first), second_(second) {}
39 template <
typename F_TYPE,
typename S_TYPE>
40 original::couple<F_TYPE, S_TYPE>::couple(
const couple& other)
41 : first_(other.first_), second_(other.second_) {}
43 template <
typename F_TYPE,
typename S_TYPE>
44 auto original::couple<F_TYPE, S_TYPE>::operator=(
const couple& other) ->
couple&
46 if (
this == &other)
return *
this;
47 first_ = other.first_;
48 second_ = other.second_;
52 template <
typename F_TYPE,
typename S_TYPE>
53 auto original::couple<F_TYPE, S_TYPE>::operator==(
const couple& other)
const ->
bool
55 return first_ == other.first_ && second_ == other.second_;
58 template <
typename F_TYPE,
typename S_TYPE>
59 auto original::couple<F_TYPE, S_TYPE>::first() -> F_TYPE&
64 template <
typename F_TYPE,
typename S_TYPE>
65 auto original::couple<F_TYPE, S_TYPE>::second() -> S_TYPE&
70 template <
typename F_TYPE,
typename S_TYPE>
71 original::couple<F_TYPE, S_TYPE>::~couple() =
default;
73 template <
typename F_TYPE,
typename S_TYPE>
74 auto original::couple<F_TYPE, S_TYPE>::className() const -> std::
string
79 template <
typename F_TYPE,
typename S_TYPE>
80 auto original::couple<F_TYPE, S_TYPE>::toString(
const bool enter)
const -> std::string
83 ss << this->className() <<
"(" <<
"first: " << formatString(this->first_)
84 <<
", " <<
"second: " << formatString(this->second_) <<
")";
85 if (enter) ss <<
"\n";