[#BloombergLP-bdlc-FlatHashMap-reserve]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/FlatHashMap.adoc[FlatHashMap]::reserve
:relfileprefix: ../../../
:mrdocs:

Change the capacity of this map to at least a capacity that can accommodate the specified `numEntries` (accounting for the load factor invariant), and redistribute all the contained elements into a new sequence of entries according to their hash values&period; If `0 &equals;&equals; numEntries` and `0 &equals;&equals; size()`, the map is returned to the default constructed state&period; After this call, `load&lowbar;factor()` will be less than or equal to `max&lowbar;load&lowbar;factor()` and all iterators, pointers, and references to elements of this map are invalidated&period; Note that this method is effectively equivalent to&colon; &grave; rehash(bsl&colon;&colon;ceil(numEntries &sol; max&lowbar;load&lowbar;factor())) &grave;

== Synopsis

Declared in `&lt;bdlc&lowbar;flathashmap&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
reserve(std::size&lowbar;t numEntries);
----


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