BloombergLP::bdlc::FlatHashTable::emplace

Emplace an ENTRY constructed from args into this table.

Synopsis

Declared in <bdlc_flathashtable.h>

template<class... ARGS>
bsl::pair<FlatHashTable<KEY, ENTRY, ENTRY_UTIL, HASH, EQUAL>::iterator, bool>
emplace(ARGS&&... args);

Description

Create an ENTRY object from the specified args, and attempt to add it to this flat hash table. Return a bsl::pair containing an iterator to the newly inserted object and true if the element was added. If an entry with the same key already exists in this flat hash table, return an iterator to that entry and false. This method requires that the ENTRY be copy-constructible.

Return Value

pair of iterator to the entry and whether insertion occurred

Parameters

NameDescription
argsarguments forwarded to construct the entry