absl::linked_hash_map::try_emplace

Constructs an element in place if the key is not present, ignoring the position hint.

Synopsis

Declared in <absl/container/linked_hash_map.h>

template<
    class K = key_type,
    class... Args,
    K* = nullptr>
iterator
try_emplace(
    const_iterator hint,
    key_arg<K>&& k,
    Args&&... args);

Return Value

An iterator to the inserted or existing element.

Parameters

NameDescription
kThe key to insert or look up.
argsThe arguments used to construct the mapped value.
hintA position hint, which is ignored.