Constructs an element in place if the key is not already present.
Declared in <absl/container/linked_hash_map.h>
template<
class K = key_type,
typename... Args,
K* = nullptr>
std::pair<iterator, bool>
try_emplace(
key_arg<K>&& key,
Args&&... args);
A pair of an iterator to the element and a bool that is true if insertion took place.
| Name | Description |
|---|---|
| key | The key to insert or look up. |
| args | The arguments used to construct the mapped value. |