[#BloombergLP-bslalg-HashTableImpUtil-rehash] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/HashTableImpUtil.adoc[HashTableImpUtil]::rehash :relfileprefix: ../../../ :mrdocs: Populate the specified `newHashTable` with all the elements in the specified `elementList`, using the specified `hasher` to determine the (non‐adjusted) hash code for each element. This operation provides the strong exception guarantee unless the supplied `hasher` throws, in which case it provides no exception safety guarantee. The buckets in the array in `newAnchor` and the list root address in `newAnchor` are assumed to be garbage and overwritten. The behavior is undefined unless, `newHashTable` holds no elements and has one or more (empty) buckets, and `elementList` is a well‐formed bi‐directional list (see `BidirectionalLinkListUtil::isWellFormed`) whose nodes are each of type `BidirectionalNode<KEY_CONFIG::ValueType>`, the previous address of the first node and the next address of the last node are 0. == Synopsis Declared in `<bslalg_hashtableimputil.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class KEY_CONFIG, class HASHER> static void rehash( xref:BloombergLP/bslalg/HashTableAnchor.adoc[HashTableAnchor]* newAnchor, xref:BloombergLP/bslalg/BidirectionalLink.adoc[BidirectionalLink]* elementList, HASHER const& hasher); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#