[#bsl-unordered_set-0d2d-rehash]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_set-0d2d.adoc[unordered&lowbar;set]::rehash
:relfileprefix: ../../
:mrdocs:

Rehash this set to have at least `numBuckets` buckets&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
rehash(xref:bsl/unordered_set-0d2d/size_type.adoc[size&lowbar;type] numBuckets);
----

== Description

Change the size of the array of buckets maintained by this container to the specified `numBuckets`, and redistribute all the contained elements into the new sequence of buckets, according to their hash values&period; Note that this operation has no effect if rehashing the elements into `numBuckets` would cause this set to exceed its `max&lowbar;load&lowbar;factor`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *numBuckets*
| desired number of buckets
|===


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