BloombergLP::bslstl::HashTable<UnorderedMapKeyConfiguration<basic_string<char> const, pair<basic_string<char> const, Json>>, TransparentHash, TransparentEqualTo, allocator<pair<basic_string<char> const, Json>>>::reserveForNumElements

Re-organize this hash-table to have a sufficient number of buckets to accommodate at least the specified numElements without exceeding the maxLoadFactor, and ensure that there are sufficient nodes pre-allocated in this object's node pool. If this function tries to allocate a number of buckets larger than can be represented by this hash table's SizeType, a std::length_error exception is thrown. This operation provides the strong exception guarantee (see {bsldoc_glossary}) unless the hasher throws, in which case this operation provides the basic exception guarantee, leaving the hash-table in a valid, but otherwise unspecified (and potentially empty), state.

Synopsis

Declared in <bslstl_hashtable.h>

void
reserveForNumElements(SizeType numElements);