MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / max_size

Function max_size

Source/Utils/json.hpp:21564–21586  ·  view source on GitHub ↗

! @brief returns the maximum possible number of elements 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. @return The return value depends on the different types and is defined as follows: Value ty

Source from the content-addressed store, hash-verified

21562 @since version 1.0.0
21563 */
21564 size_type max_size() const noexcept
21565 {
21566 switch (m_type)
21567 {
21568 case value_t::array:
21569 {
21570 // delegate call to array_t::max_size()
21571 return m_value.array->max_size();
21572 }
21573
21574 case value_t::object:
21575 {
21576 // delegate call to object_t::max_size()
21577 return m_value.object->max_size();
21578 }
21579
21580 default:
21581 {
21582 // all other types have max_size() == size()
21583 return size();
21584 }
21585 }
21586 }
21587
21588 /// @}
21589

Callers

nothing calls this directly

Calls 1

sizeFunction · 0.85

Tested by

no test coverage detected