mirror of
https://github.com/nlohmann/json.git
synced 2024-11-28 09:09:02 +08:00
ecbb2756fd
The current code uses std::stoi to convert the input string to an int array_index. This limits the maximum addressable array size to ~2GB on most platforms. But all callers immediately convert the result of array_index to BasicJsonType::size_type. So let's parse it as unsigned long long, which allows us to have as big arrays as available memory. And also makes the call sites nicer to read. One complication arises on platforms where size_type is smaller than unsigned long long. We need to bail out on these if the parsed array index does not fit into size_type. |
||
---|---|---|
.. | ||
nlohmann |