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);

Return a modifiable reference to the mapped value for key.

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

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;

Return Value

modifiable reference to the mapped value

Parameters

Name

Description

key

key whose mapped value is accessed or inserted

Created with MrDocs