diff --git a/src/3rdparty/optional/optional.hpp b/src/3rdparty/optional/optional.hpp index e22297c4c6..e0bf7007e8 100644 --- a/src/3rdparty/optional/optional.hpp +++ b/src/3rdparty/optional/optional.hpp @@ -826,185 +826,62 @@ template constexpr bool operator>=(nullopt_t, const optional& x) no // 20.5.10, Comparison with T -template constexpr bool operator==(const optional& x, const T& v) +template constexpr bool operator==(const optional& x, const U& v) { return bool(x) ? *x == v : false; } -template constexpr bool operator==(const T& v, const optional& x) +template constexpr bool operator==(const T& v, const optional& x) { return bool(x) ? v == *x : false; } -template constexpr bool operator!=(const optional& x, const T& v) +template constexpr bool operator!=(const optional& x, const U& v) { return bool(x) ? *x != v : true; } -template constexpr bool operator!=(const T& v, const optional& x) +template constexpr bool operator!=(const T& v, const optional& x) { return bool(x) ? v != *x : true; } -template constexpr bool operator<(const optional& x, const T& v) +template constexpr bool operator<(const optional& x, const U& v) { return bool(x) ? *x < v : true; } -template constexpr bool operator>(const T& v, const optional& x) +template constexpr bool operator>(const T& v, const optional& x) { return bool(x) ? v > *x : true; } -template constexpr bool operator>(const optional& x, const T& v) +template constexpr bool operator>(const optional& x, const U& v) { return bool(x) ? *x > v : false; } -template constexpr bool operator<(const T& v, const optional& x) +template constexpr bool operator<(const T& v, const optional& x) { return bool(x) ? v < *x : false; } -template constexpr bool operator>=(const optional& x, const T& v) +template constexpr bool operator>=(const optional& x, const U& v) { return bool(x) ? *x >= v : false; } -template constexpr bool operator<=(const T& v, const optional& x) +template constexpr bool operator<=(const T& v, const optional& x) { return bool(x) ? v <= *x : false; } -template constexpr bool operator<=(const optional& x, const T& v) +template constexpr bool operator<=(const optional& x, const U& v) { return bool(x) ? *x <= v : true; } -template constexpr bool operator>=(const T& v, const optional& x) -{ - return bool(x) ? v >= *x : true; -} - - -// Comparison of optional with T -template constexpr bool operator==(const optional& x, const T& v) -{ - return bool(x) ? *x == v : false; -} - -template constexpr bool operator==(const T& v, const optional& x) -{ - return bool(x) ? v == *x : false; -} - -template constexpr bool operator!=(const optional& x, const T& v) -{ - return bool(x) ? *x != v : true; -} - -template constexpr bool operator!=(const T& v, const optional& x) -{ - return bool(x) ? v != *x : true; -} - -template constexpr bool operator<(const optional& x, const T& v) -{ - return bool(x) ? *x < v : true; -} - -template constexpr bool operator>(const T& v, const optional& x) -{ - return bool(x) ? v > *x : true; -} - -template constexpr bool operator>(const optional& x, const T& v) -{ - return bool(x) ? *x > v : false; -} - -template constexpr bool operator<(const T& v, const optional& x) -{ - return bool(x) ? v < *x : false; -} - -template constexpr bool operator>=(const optional& x, const T& v) -{ - return bool(x) ? *x >= v : false; -} - -template constexpr bool operator<=(const T& v, const optional& x) -{ - return bool(x) ? v <= *x : false; -} - -template constexpr bool operator<=(const optional& x, const T& v) -{ - return bool(x) ? *x <= v : true; -} - -template constexpr bool operator>=(const T& v, const optional& x) -{ - return bool(x) ? v >= *x : true; -} - -// Comparison of optional with T -template constexpr bool operator==(const optional& x, const T& v) -{ - return bool(x) ? *x == v : false; -} - -template constexpr bool operator==(const T& v, const optional& x) -{ - return bool(x) ? v == *x : false; -} - -template constexpr bool operator!=(const optional& x, const T& v) -{ - return bool(x) ? *x != v : true; -} - -template constexpr bool operator!=(const T& v, const optional& x) -{ - return bool(x) ? v != *x : true; -} - -template constexpr bool operator<(const optional& x, const T& v) -{ - return bool(x) ? *x < v : true; -} - -template constexpr bool operator>(const T& v, const optional& x) -{ - return bool(x) ? v > *x : true; -} - -template constexpr bool operator>(const optional& x, const T& v) -{ - return bool(x) ? *x > v : false; -} - -template constexpr bool operator<(const T& v, const optional& x) -{ - return bool(x) ? v < *x : false; -} - -template constexpr bool operator>=(const optional& x, const T& v) -{ - return bool(x) ? *x >= v : false; -} - -template constexpr bool operator<=(const T& v, const optional& x) -{ - return bool(x) ? v <= *x : false; -} - -template constexpr bool operator<=(const optional& x, const T& v) -{ - return bool(x) ? *x <= v : true; -} - -template constexpr bool operator>=(const T& v, const optional& x) +template constexpr bool operator>=(const T& v, const optional& x) { return bool(x) ? v >= *x : true; }