[#bsl-unordered_map-02b-max_load_factor-0a] = xref:bsl.adoc[bsl]::xref:bsl/unordered_map-02b.adoc[unordered_map]::max_load_factor :relfileprefix: ../../ :mrdocs: `max_load_factor` overloads == Synopses Declared in `<bslstl_unorderedmap.h>` Return the maximum load factor allowed for this unordered map. Note that if an insert operation would cause the load factor to exceed the `max_load_factor`, that same insert operation will increase the number of buckets and rehash the elements of the container into those buckets (see `rehash`). [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- float xref:bsl/unordered_map-02b/max_load_factor-01.adoc[max_load_factor]() const noexcept; ---- [.small]#xref:bsl/unordered_map-02b/max_load_factor-01.adoc[_» more..._]# 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`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:bsl/unordered_map-02b/max_load_factor-0e.adoc[max_load_factor](float newMaxLoadFactor); ---- [.small]#xref:bsl/unordered_map-02b/max_load_factor-0e.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#