[#bsl-unordered_map-0bf-reserve]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_map-0bf.adoc[unordered&lowbar;map&lt;basic&lowbar;string&lt;char&gt;, Json, TransparentHash, TransparentEqualTo&gt;]::reserve
:relfileprefix: ../../
:mrdocs:

Increase the number of buckets of this set to a quantity such that the ratio between the specified `numElements` and this quantity does not exceed `max&lowbar;load&lowbar;factor`&period; Note that this guarantees that, after the reserve, elements can be inserted to grow the container to `size() &equals;&equals; numElements` without rehashing&period; Also note that memory allocations may still occur when growing the container to &grave;size() &equals;&equals; numElements&grave;&period; Also note that this operation has no effect if `numElements &lt;&equals; size()`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
reserve(xref:bsl/unordered_map-0bf/size_type.adoc[size&lowbar;type] numElements);
----


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