| 123456789101112131415161718 |
- #pragma once
- #include <compare>
- // Apple Clang does not properly support <=> in the STL - so we need to force it
- #if __cpp_lib_three_way_comparison < 201907L
- namespace std {
- template <typename T> auto operator<=>(T const & lhs, T const & rhs) {
- if (lhs < rhs) {
- return std::strong_ordering::less;
- }
- if (lhs > rhs) {
- return std::strong_ordering::greater;
- }
- return std::strong_ordering::equal;
- }
- }
- #endif
|