BloombergLP::bslstl::HashTable_Util::initAnchor

Initialize anchor with a newly allocated bucket array.

Synopsis

Declared in <bslstl_hashtable.h>

template<class ALLOCATOR>
static
void
initAnchor(
    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

NameDescription
anchorhash-table anchor to initialize
bucketArraySizenumber of buckets to allocate
allocatorallocator used to supply memory