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

Set the maximum load factor permitted by this hash table to the specified newMaxLoadFactor, where load factor is the statistical mean number of elements per bucket. If 'newMaxLoadFactor < loadFactor', allocate at least enough buckets to re-establish the invariant loadFactor <= maxLoadFactor. 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. The behavior is undefined unless 0 < maxLoadFactor.

Synopsis

Declared in <bslstl_hashtable.h>

void
setMaxLoadFactor(float newMaxLoadFactor);