bsl::unordered_map::max_load_factor

Set the maximum load factor to newMaxLoadFactor.

Synopsis

Declared in <bslstl_unorderedmap.h>

void
max_load_factor(float newMaxLoadFactor);

Description

Set the maximum load factor of this unordered map to the specified newMaxLoadFactor. If newMaxLoadFactor < loadFactor(), this operator will cause an immediate rehash (in violation of the C++11 standard); otherwise, it has a constant-time cost. The behavior is undefined unless 0 < newMaxLoadFactor.

Parameters

NameDescription
newMaxLoadFactornew maximum load factor