diff --git a/src/json.hpp b/src/json.hpp index 9312c4f4..f66d0b59 100644 --- a/src/json.hpp +++ b/src/json.hpp @@ -8498,13 +8498,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 2ab300ec..f893aac0 100644 --- a/src/json.hpp.re2c +++ b/src/json.hpp.re2c @@ -7808,13 +7808,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