[#BloombergLP-bslstl-HashTable_Util-initAnchor] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslstl.adoc[bslstl]::xref:BloombergLP/bslstl/HashTable_Util.adoc[HashTable_Util]::initAnchor :relfileprefix: ../../../ :mrdocs: Initialize `anchor` with a newly allocated bucket array. == Synopsis Declared in `<bslstl_hashtable.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOCATOR> static void initAnchor( xref:BloombergLP/bslalg/HashTableAnchor.adoc[bslalg::HashTableAnchor]* anchor, std::size_t bucketArraySize, ALLOCATOR const& allocator); ---- == Description Load into the specified `anchor` a (contiguous) array of buckets of the specified `bucketArraySize` using memory supplied by the specified `allocator`. The behavior is undefined unless `0 < bucketArraySize` and `0 == anchor‐>bucketArraySize()`. Note that this operation has no effect on `anchor‐>listRootAddress()`. == Parameters [cols="1,4"] |=== | Name| Description | *anchor* | hash‐table anchor to initialize | *bucketArraySize* | number of buckets to allocate | *allocator* | allocator used to supply memory |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#