remove use of operator<=>

it doesn't work on mac
This commit is contained in:
HJfod 2022-12-11 21:01:52 +02:00
parent 8a1ecbe5ab
commit 500e6f2d26

View file

@ -44,11 +44,28 @@ namespace geode {
return m_patch; return m_patch;
} }
constexpr std::strong_ordering operator<=>(VersionInfo const& other) const { // Apple clang does not support operator<=>! Yippee!
return std::tie(m_major, m_minor, m_patch) <=>
constexpr bool operator==(VersionInfo const& other) const {
return std::tie(m_major, m_minor, m_patch) ==
std::tie(other.m_major, other.m_minor, other.m_patch);
}
constexpr bool operator<(VersionInfo const& other) const {
return std::tie(m_major, m_minor, m_patch) <
std::tie(other.m_major, other.m_minor, other.m_patch);
}
constexpr bool operator<=(VersionInfo const& other) const {
return std::tie(m_major, m_minor, m_patch) <=
std::tie(other.m_major, other.m_minor, other.m_patch);
}
constexpr bool operator>(VersionInfo const& other) const {
return std::tie(m_major, m_minor, m_patch) >
std::tie(other.m_major, other.m_minor, other.m_patch);
}
constexpr bool operator>=(VersionInfo const& other) const {
return std::tie(m_major, m_minor, m_patch) >=
std::tie(other.m_major, other.m_minor, other.m_patch); std::tie(other.m_major, other.m_minor, other.m_patch);
} }
constexpr bool operator==(VersionInfo const& other) const = default;
std::string toString() const; std::string toString() const;
}; };