From 4f901788f4b86b560b6442ebfd1b87d0d43ed13c Mon Sep 17 00:00:00 2001 From: Denis Angell Date: Mon, 11 Nov 2024 11:13:57 +0100 Subject: [PATCH] [fold] preprocessor macros --- src/ripple/basics/base_uint.h | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/ripple/basics/base_uint.h b/src/ripple/basics/base_uint.h index 0b7c6a520..56346a7ed 100644 --- a/src/ripple/basics/base_uint.h +++ b/src/ripple/basics/base_uint.h @@ -549,6 +549,7 @@ using uint128 = base_uint<128>; using uint160 = base_uint<160>; using uint256 = base_uint<256>; +#ifdef __APPLE__ template [[nodiscard]] inline constexpr std::strong_ordering operator<=>(base_uint const& lhs, base_uint const& rhs) @@ -560,7 +561,6 @@ operator<=>(base_uint const& lhs, base_uint const& rhs) // // FIXME: use std::lexicographical_compare_three_way once support is // added to MacOS. - auto const ret = std::mismatch(lhs.cbegin(), lhs.cend(), rhs.cbegin()); // a == b @@ -568,10 +568,9 @@ operator<=>(base_uint const& lhs, base_uint const& rhs) return std::strong_ordering::equivalent; return (*ret.first > *ret.second) ? std::strong_ordering::greater - : std::strong_ordering::less; + : std::strong_ordering::less; } - -/* +#elif template [[nodiscard]] inline constexpr std::strong_ordering operator<=>(base_uint const& lhs, base_uint const& rhs) @@ -583,7 +582,7 @@ operator<=>(base_uint const& lhs, base_uint const& rhs) rhs.cend(), std::compare_three_way{}); } -*/ +#endif template [[nodiscard]] inline constexpr bool