Create an empty table with at least the specified capacity.

Synopsis

Declared in <bdlc_flathashtable.h>

FlatHashTable(
    std::size_t capacity,
    HASH const& hash,
    EQUAL const& equal,
    bslma::Allocator* basicAllocator = 0);

Description

Create an empty table having at least the specified capacity, that will use the specified hash to generate hash values for the keys of the entries contained in this table, and the specified equal to verify that the keys of the two entries are the same. Optionally specify a basicAllocator used to supply memory. If basicAllocator is 0, the currently installed default allocator is used. If 0 == capacity, no memory is allocated and the object is defined to be in the "zero‐capacity" state.

Parameters

Name

Description

capacity

minimum capacity for the new table

hash

hash functor used for keys

equal

key‐equality predicate

basicAllocator

allocator used to supply memory

Created with MrDocs