diff --git a/Utilities/types.h b/Utilities/types.h index 5f48a340ef..3eef35eea5 100644 --- a/Utilities/types.h +++ b/Utilities/types.h @@ -423,7 +423,7 @@ constexpr inline struct umax_helper template , typename = std::enable_if_t>> constexpr bool operator==(const T& rhs) const { - return std::numeric_limits::max() == rhs; + return rhs == std::numeric_limits::max(); } #if __cpp_impl_three_way_comparison >= 201711 && !__INTELLISENSE__ @@ -431,7 +431,7 @@ constexpr inline struct umax_helper template friend constexpr std::enable_if_t>, bool> operator==(const T& lhs, const umax_helper& rhs) { - return std::numeric_limits>::max() == lhs; + return lhs == std::numeric_limits>::max(); } #endif @@ -440,13 +440,13 @@ constexpr inline struct umax_helper template , typename = std::enable_if_t>> constexpr bool operator!=(const T& rhs) const { - return std::numeric_limits::max() != rhs; + return rhs != std::numeric_limits::max(); } template friend constexpr std::enable_if_t>, bool> operator!=(const T& lhs, const umax_helper& rhs) { - return std::numeric_limits>::max() != lhs; + return lhs != std::numeric_limits>::max(); } #endif } umax;