BloombergLP::bdlc::FlatHashMap_EntryUtil::constructFromKey

Construct an ENTRY from key and a default-constructed value.

Synopsis

Declared in <bdlc_flathashmap.h>

template<class KEY_TYPE>
static
void
constructFromKey(
    ENTRY* entry,
    bslma::Allocator* allocator,
    KEY_TYPE&& key);

Description

Load into the specified entry the ENTRY value comprised of the specified key and a default constructed VALUE, using the specified allocator to supply memory. allocator is ignored if the (template parameter) type ENTRY is not allocator aware.

Parameters

NameDescription
entryaddress at which to construct the entry
allocatorallocator used to supply memory
keykey used to construct the entry