bsl::map::operator[]

Subscript operators

Synopses

Declared in <bslstl_map.h>

Return a modifiable reference to the mapped value for key.

add_lvalue_reference<VALUE>::type
operator[](BloombergLP::bslmf::MovableRef<key_type> key);
» more...

Return a modifiable reference to the mapped value for key.

add_lvalue_reference<VALUE>::type
operator[](key_type const& key);
» more...

Return mapped-value access for an equivalent lookup key.

template<class LOOKUP_KEY>
add_lvalue_reference<VALUE>::type
operator[](LOOKUP_KEY&& key)
requires BloombergLP::bslmf::IsTransparentPredicate<COMPARATOR,
                                                   LOOKUP_KEY>::value;
» more...

Return Value

modifiable reference to the mapped value

Parameters

NameDescription
keykey whose mapped value is accessed or inserted