diff --git a/src/json.hpp b/src/json.hpp
index f66d0b59..cbb9e5f0 100644
--- a/src/json.hpp
+++ b/src/json.hpp
@@ -8504,7 +8504,7 @@ basic_json_parser_63:
             else
             {
                 type = value_t::number_unsigned;
-                max = static_cast<uint64_t>((std::numeric_limits<number_unsigned_t>::max()));
+                max = static_cast<uint64_t>((std::numeric_limits<number_unsigned_t>::max)());
             }
 
             // count the significant figures
diff --git a/src/json.hpp.re2c b/src/json.hpp.re2c
index f893aac0..c60207f6 100644
--- a/src/json.hpp.re2c
+++ b/src/json.hpp.re2c
@@ -7814,7 +7814,7 @@ class basic_json
             else
             {
                 type = value_t::number_unsigned;
-                max = static_cast<uint64_t>((std::numeric_limits<number_unsigned_t>::max()));
+                max = static_cast<uint64_t>((std::numeric_limits<number_unsigned_t>::max)());
             }
 
             // count the significant figures