diff --git a/src/json.hpp b/src/json.hpp index 436467632..a8902bdb0 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -8497,13 +8497,13 @@ basic_json_parser_63: if (*curptr == '-') { type = value_t::number_integer; - max = static_cast(std::numeric_limits::max()) + 1; + max = static_cast((std::numeric_limits::max)()) + 1; curptr++; } else { type = value_t::number_unsigned; - max = static_cast(std::numeric_limits::max()); + max = static_cast((std::numeric_limits::max())); } // count the significant figures diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c index ba4fc007b..9fe8ca683 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -7807,13 +7807,13 @@ class basic_json if (*curptr == '-') { type = value_t::number_integer; - max = static_cast(std::numeric_limits::max()) + 1; + max = static_cast((std::numeric_limits::max)()) + 1; curptr++; } else { type = value_t::number_unsigned; - max = static_cast(std::numeric_limits::max()); + max = static_cast((std::numeric_limits::max())); } // count the significant figures