[#bsl-unordered_map-02b-operator_subs-01]
= xref:bsl.adoc[bsl]::xref:bsl/unordered_map-02b.adoc[unordered&lowbar;map]::operator&lsqb;&rsqb;
:relfileprefix: ../../
:mrdocs:

Subscript operators

== Synopses

Declared in `&lt;bslstl&lowbar;unorderedmap&period;h&gt;`

Return a modifiable reference to the mapped value for movable `key`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
add&lowbar;lvalue&lowbar;reference&lt;VALUE&gt;::type
xref:bsl/unordered_map-02b/operator_subs-0d4.adoc[operator&lsqb;&rsqb;](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;key&lowbar;type&gt;] key);
----

[.small]#xref:bsl/unordered_map-02b/operator_subs-0d4.adoc[_» more&period;&period;&period;_]#

Return a modifiable reference to the mapped value for `key`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
add&lowbar;lvalue&lowbar;reference&lt;VALUE&gt;::type
xref:bsl/unordered_map-02b/operator_subs-0de.adoc[operator&lsqb;&rsqb;](xref:bsl/unordered_map-02b/key_type.adoc[key&lowbar;type] const& key);
----

[.small]#xref:bsl/unordered_map-02b/operator_subs-0de.adoc[_» more&period;&period;&period;_]#

Return a modifiable reference to the mapped value for an equivalent `key`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class LOOKUP&lowbar;KEY&gt;
add&lowbar;lvalue&lowbar;reference&lt;VALUE&gt;::type
xref:bsl/unordered_map-02b/operator_subs-0a.adoc[operator&lsqb;&rsqb;](LOOKUP&lowbar;KEY&& key)
requires BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;HASH, LOOKUP&lowbar;KEY&gt;&colon;&colon;value
        &amp;&amp; BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;EQUAL,LOOKUP&lowbar;KEY&gt;&colon;&colon;value;
----

[.small]#xref:bsl/unordered_map-02b/operator_subs-0a.adoc[_» more&period;&period;&period;_]#

== Return Value

modifiable reference to the mapped value

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| key to look up
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
