MCPcopy Create free account
hub / github.com/boostorg/json / reserve

Method reserve

include/boost/json/string.hpp:1064–1070  ·  view source on GitHub ↗

Increase the capacity to at least a certain amount. This increases the capacity of the array to a value that is greater than or equal to `new_capacity`. If `new_capacity > `@ref capacity(), new memory is allocated. Otherwise, the call has no effect. The number of elements and therefore the @ref size() of the container is not changed. If new memory

Source from the content-addressed store, hash-verified

1062 @throw boost::system::system_error `new_capacity > `@ref max_size().
1063 */
1064 void
1065 reserve(std::size_t new_capacity)
1066 {
1067 if(new_capacity <= capacity())
1068 return;
1069 reserve_impl(new_capacity);
1070 }
1071
1072 /** Request the removal of unused capacity.
1073

Callers 15

serialize_cbor_valueFunction · 0.45
parse_cbor_objectFunction · 0.45
to_string_testFunction · 0.45
greetingFunction · 0.45
simple_runnerMethod · 0.45
runFunction · 0.45
grind_oneMethod · 0.45
grindMethod · 0.45
testHashPolicyMethod · 0.45
testCollisionsMethod · 0.45
testAllocationMethod · 0.45
testStrongGuranteeMethod · 0.45

Calls

no outgoing calls

Tested by 3

to_string_testFunction · 0.36
simple_runnerMethod · 0.36
runFunction · 0.36