diff --git a/Source/LuaBridge/detail/LuaHelpers.h b/Source/LuaBridge/detail/LuaHelpers.h index febf655a..62b8db4c 100644 --- a/Source/LuaBridge/detail/LuaHelpers.h +++ b/Source/LuaBridge/detail/LuaHelpers.h @@ -551,23 +551,23 @@ constexpr bool is_integral_representable_by(T value) return true; if constexpr (std::is_unsigned_v) - return value <= static_cast(std::numeric_limits::max()); + return value <= static_cast((std::numeric_limits::max)()); - return value >= static_cast(std::numeric_limits::min()) - && static_cast(value) <= std::numeric_limits::max(); + return value >= static_cast((std::numeric_limits::min)()) + && static_cast(value) <= (std::numeric_limits::max)(); } if constexpr (sizeof(T) < sizeof(U)) { - return static_cast(value) >= std::numeric_limits::min() - && static_cast(value) <= std::numeric_limits::max(); + return static_cast(value) >= (std::numeric_limits::min)() + && static_cast(value) <= (std::numeric_limits::max)(); } if constexpr (std::is_unsigned_v) - return value <= static_cast(std::numeric_limits::max()); + return value <= static_cast((std::numeric_limits::max)()); - return value >= static_cast(std::numeric_limits::min()) - && value <= static_cast(std::numeric_limits::max()); + return value >= static_cast((std::numeric_limits::min)()) + && value <= static_cast((std::numeric_limits::max)()); } template @@ -590,11 +590,11 @@ constexpr bool is_floating_point_representable_by(T value) return true; if constexpr (sizeof(T) < sizeof(U)) - return static_cast(value) >= -std::numeric_limits::max() - && static_cast(value) <= std::numeric_limits::max(); + return static_cast(value) >= -(std::numeric_limits::max)() + && static_cast(value) <= (std::numeric_limits::max)(); - return value >= static_cast(-std::numeric_limits::max()) - && value <= static_cast(std::numeric_limits::max()); + return value >= static_cast(-(std::numeric_limits::max)()) + && value <= static_cast((std::numeric_limits::max)()); } template