We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b125e29 commit e035c9aCopy full SHA for e035c9a
include/nlohmann/detail/input/parser.hpp
@@ -4,6 +4,7 @@
4
#include <cmath> // isfinite
5
#include <cstdint> // uint8_t
6
#include <functional> // function
7
+#include <limits> // numeric_limits
8
#include <string> // string
9
#include <utility> // move
10
#include <vector> // vector
@@ -185,7 +186,7 @@ class parser
185
186
{
187
case token_type::begin_object:
188
- if (JSON_HEDLEY_UNLIKELY(not sax->start_object(std::size_t(-1))))
189
+ if (JSON_HEDLEY_UNLIKELY(not sax->start_object((std::numeric_limits<std::size_t>::max)())))
190
191
return false;
192
}
0 commit comments