From 500e6f2d263b02567f94c17c707ccfaa48e0492a Mon Sep 17 00:00:00 2001 From: HJfod <60038575+HJfod@users.noreply.github.com> Date: Sun, 11 Dec 2022 21:01:52 +0200 Subject: [PATCH] remove use of operator<=> it doesn't work on mac --- loader/include/Geode/utils/VersionInfo.hpp | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/loader/include/Geode/utils/VersionInfo.hpp b/loader/include/Geode/utils/VersionInfo.hpp index 368dfb4b..356774d9 100644 --- a/loader/include/Geode/utils/VersionInfo.hpp +++ b/loader/include/Geode/utils/VersionInfo.hpp @@ -44,11 +44,28 @@ namespace geode { return m_patch; } - constexpr std::strong_ordering operator<=>(VersionInfo const& other) const { - return std::tie(m_major, m_minor, m_patch) <=> + // Apple clang does not support operator<=>! Yippee! + + 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); } - constexpr bool operator==(VersionInfo const& other) const = default; std::string toString() const; };