mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-23 00:47:21 -06:00
Use default operators generated/synthesized by compiler
This commit is contained in:
@@ -124,13 +124,12 @@ namespace Utils
|
||||
return res;
|
||||
}
|
||||
|
||||
// TODO: remove manually defined operators and use compiler generated `operator<=>()` in C++20
|
||||
friend bool operator==(const ThisType &left, const ThisType &right)
|
||||
friend constexpr bool operator==(const ThisType &left, const ThisType &right)
|
||||
{
|
||||
return (left.m_components == right.m_components);
|
||||
}
|
||||
|
||||
friend bool operator<(const ThisType &left, const ThisType &right)
|
||||
friend constexpr bool operator<(const ThisType &left, const ThisType &right)
|
||||
{
|
||||
return (left.m_components < right.m_components);
|
||||
}
|
||||
@@ -159,12 +158,6 @@ namespace Utils
|
||||
std::array<int, N> m_components {{}};
|
||||
};
|
||||
|
||||
template <int N, int Mandatory>
|
||||
constexpr bool operator!=(const Version<N, Mandatory> &left, const Version<N, Mandatory> &right)
|
||||
{
|
||||
return !(left == right);
|
||||
}
|
||||
|
||||
template <int N, int Mandatory>
|
||||
constexpr bool operator>(const Version<N, Mandatory> &left, const Version<N, Mandatory> &right)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user