[#bsl-unordered_map-02b-max_load_factor-0a]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_map-02b.adoc[unordered&lowbar;map]::max&lowbar;load&lowbar;factor
:relfileprefix: ../../
:mrdocs:

`max&lowbar;load&lowbar;factor` overloads

== Synopses

Declared in `&lt;bslstl&lowbar;unorderedmap&period;h&gt;`

Return the maximum load factor allowed for this unordered map&period; Note that if an insert operation would cause the load factor to exceed the `max&lowbar;load&lowbar;factor`, that same insert operation will increase the number of buckets and rehash the elements of the container into those buckets (see `rehash`)&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
float
xref:bsl/unordered_map-02b/max_load_factor-01.adoc[max&lowbar;load&lowbar;factor]() const noexcept;
----

[.small]#xref:bsl/unordered_map-02b/max_load_factor-01.adoc[_» more&period;&period;&period;_]#

Set the maximum load factor of this unordered map to the specified `newMaxLoadFactor`&period; If `newMaxLoadFactor &lt; loadFactor()`, this operator will cause an immediate rehash (in violation of the C&plus;&plus;11 standard)&semi; otherwise, it has a constant&hyphen;time cost&period; The behavior is undefined unless `0 &lt; newMaxLoadFactor`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:bsl/unordered_map-02b/max_load_factor-0e.adoc[max&lowbar;load&lowbar;factor](float newMaxLoadFactor);
----

[.small]#xref:bsl/unordered_map-02b/max_load_factor-0e.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
