Returns a reference to the value mapped to the given key, inserting a default‐constructed value if the key is not present.

Synopses

Declared in <absl/container/linked_hash_map.h>

Returns a reference to the value mapped to the given key, inserting a default‐constructed value if the key is not present.

template<class K = key_type>
mapped_type&
operator[](key_arg<K> const& key);

Returns a reference to the value mapped to the given key, inserting a default‐constructed value if the key is not present.

template<
    class K = key_type,
    K* = nullptr>
mapped_type&
operator[](key_arg<K>&& key);

Return Value

A reference to the mapped value.

Parameters

Name

Description

key

The key to look up.

Created with MrDocs