MCPcopy Create free account
hub / github.com/BehaviorTree/BehaviorTree.CPP / max_size

Function max_size

include/behaviortree_cpp/contrib/json.hpp:22286–22316  ·  view source on GitHub ↗

@brief returns the maximum possible number of elements @sa https://json.nlohmann.me/api/basic_json/max_size/

Source from the content-addressed store, hash-verified

22284 /// @brief returns the maximum possible number of elements
22285 /// @sa https://json.nlohmann.me/api/basic_json/max_size/
22286 size_type max_size() const noexcept
22287 {
22288 switch (m_data.m_type)
22289 {
22290 case value_t::array:
22291 {
22292 // delegate call to array_t::max_size()
22293 return m_data.m_value.array->max_size();
22294 }
22295
22296 case value_t::object:
22297 {
22298 // delegate call to object_t::max_size()
22299 return m_data.m_value.object->max_size();
22300 }
22301
22302 case value_t::null:
22303 case value_t::string:
22304 case value_t::boolean:
22305 case value_t::number_integer:
22306 case value_t::number_unsigned:
22307 case value_t::number_float:
22308 case value_t::binary:
22309 case value_t::discarded:
22310 default:
22311 {
22312 // all other types have max_size() == size()
22313 return size();
22314 }
22315 }
22316 }
22317
22318 /// @}
22319

Callers

nothing calls this directly

Calls 1

sizeFunction · 0.70

Tested by

no test coverage detected