BloombergLP::bslstl::HashTable<UnorderedMapKeyConfiguration<basic_string<char> const, pair<basic_string<char> const, Json>>, TransparentHash, TransparentEqualTo, allocator<pair<basic_string<char> const, Json>>>::emplaceWithHint

Insert into this hash-table a newly-created ValueType object, constructed by forwarding the specified (variable number of) arguments to the corresponding constructor of ValueType (immediately preceding the specified hint if hint is not null and the key of the node pointed to by hint is equivalent to that of the newly-created object), and return the address of the newly inserted node. If hint is null or the key of the node pointed to by hint is not equivalent to that of the newly created object, and a key equivalent to that of the newly-created object already exists in this hash-table, then insert the newly-created object immediately before the first such element. Additional buckets will be allocated, as needed, to preserve the invariant loadFactor <= maxLoadFactor. If this function tries to allocate a number of buckets larger than can be represented by this hash table's SizeType, a std::length_error exception is thrown. This method requires that ValueType defined in the (template parameter) type KEY_CONFIG be emplace-constructible into this hash-table from arguments (see {Requirements on KEY_CONFIG}). The behavior is undefined unless hint is either null or points to a node in this hash table.

Synopsis

Declared in <bslstl_hashtable.h>

template<class... Args>
bslalg::BidirectionalLink*
emplaceWithHint(
    bslalg::BidirectionalLink* hint,
    Args&&... arguments);