|
|
@ -133,19 +133,15 @@ namespace Utils |
|
|
|
return (*this != ThisType {}); |
|
|
|
return (*this != ThisType {}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
constexpr bool operator==(const ThisType &other) const |
|
|
|
// TODO: remove manually defined operators and use compiler generated `operator<=>()` in C++20
|
|
|
|
|
|
|
|
friend bool operator==(const ThisType &left, const ThisType &right) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return (m_components == other.m_components); |
|
|
|
return (left.m_components == right.m_components); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
constexpr bool operator<(const ThisType &other) const |
|
|
|
friend bool operator<(const ThisType &left, const ThisType &right) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return (m_components < other.m_components); |
|
|
|
return (left.m_components < right.m_components); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constexpr bool operator>(const ThisType &other) const |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return (m_components > other.m_components); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template <typename StringClassWithSplitMethod> |
|
|
|
template <typename StringClassWithSplitMethod> |
|
|
@ -198,6 +194,12 @@ namespace Utils |
|
|
|
return !(left == right); |
|
|
|
return !(left == right); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
template <typename T, std::size_t N, std::size_t Mandatory> |
|
|
|
|
|
|
|
constexpr bool operator>(const Version<T, N, Mandatory> &left, const Version<T, N, Mandatory> &right) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return (right < left); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
template <typename T, std::size_t N, std::size_t Mandatory> |
|
|
|
template <typename T, std::size_t N, std::size_t Mandatory> |
|
|
|
constexpr bool operator<=(const Version<T, N, Mandatory> &left, const Version<T, N, Mandatory> &right) |
|
|
|
constexpr bool operator<=(const Version<T, N, Mandatory> &left, const Version<T, N, Mandatory> &right) |
|
|
|
{ |
|
|
|
{ |
|
|
|