diff --git a/src/core/algorithms/md/hymd/utility/md_less.h b/src/core/algorithms/md/hymd/utility/md_less.h index 526a91bff0..5d8fd0ed3c 100644 --- a/src/core/algorithms/md/hymd/utility/md_less.h +++ b/src/core/algorithms/md/hymd/utility/md_less.h @@ -20,7 +20,19 @@ inline bool MdLessPairs(MdPair const& pair_left, MdPair const& pair_right) { } else if (cardinality_left > cardinality_right) { return false; } + +#if __cpp_lib_three_way_comparison == 201907L auto comp = lhs_left <=> lhs_right; +#else + signed char comp; + if (lhs_left < rhs_left) { + comp = -1; + } else if (lhs_left == rhs_left) { + comp = 0; + } else { + comp = 1; + } +#endif if (comp < 0) { return true; } else if (comp > 0) { diff --git a/src/core/config/exceptions.h b/src/core/config/exceptions.h index adb2641153..49e55296ec 100644 --- a/src/core/config/exceptions.h +++ b/src/core/config/exceptions.h @@ -1,6 +1,7 @@ #pragma once #include +#include namespace config {