|
JSON for Modern C++
3.0
|
|
inlinenoexcept |
Returns the maximum number of elements a JSON value is able to hold due to system or library implementation limitations, i.e. std::distance(begin(), end()) for the JSON value.
| Value type | return value |
|---|---|
| null | 0 |
| boolean | 1 |
| string | 1 |
| number | 1 |
| object | result of function object_t::max_size() |
| array | result of function array_t::max_size() |
b.size() where b is the largest possible JSON value.0 1 1 1 256204778801521550 1152921504606846975 1The example code above can be translated with
g++ -std=c++11 -Isrc doc/examples/max_size.cpp -o max_size.