BloombergLP::bdlc::FlatHashMap::operator[]

Subscript operators

Synopses

Declared in <bdlc_flathashmap.h>

Return a reference providing modifiable access to the mapped value associated with the specified key in this map. If this map does not already contain an element having key, insert an element with the key and a default-constructed VALUE, and return a reference to the newly mapped value. If key is movable, key is left in a (valid) unspecified state.

VALUE&
operator[](bslmf::MovableRef<KEY> key);
» more...

Return a reference providing modifiable access to the mapped value associated with the specified key in this map. If this map does not already contain an element having key, insert an element with the key and a default-constructed VALUE, and return a reference to the newly mapped value. If key is movable, key is left in a (valid) unspecified state.

VALUE&
operator[](KEY const& key);
» more...

Return a reference providing modifiable access to the mapped value associated with the a key equivalent to the specified key in this map. If this map does not already contain an element eqivalent to key, insert an element with the KEY constructed from std::forward<LOOKUP_KEY>(k) and a default-constructed VALUE, and return a reference to the newly mapped value.

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