[#bsl-map-0a7-operator_subs-0e4]
= xref:bsl.adoc[bsl]::xref:bsl/map-0a7.adoc[map]::operator&lsqb;&rsqb;
:relfileprefix: ../../
:mrdocs:

Subscript operators

== Synopses

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

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/map-0a7/operator_subs-0e5.adoc[operator&lsqb;&rsqb;](xref:BloombergLP/bslmf/MovableRef.adoc[BloombergLP::bslmf::MovableRef&lt;key&lowbar;type&gt;] key);
----

[.small]#xref:bsl/map-0a7/operator_subs-0e5.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/map-0a7/operator_subs-0d.adoc[operator&lsqb;&rsqb;](xref:bsl/map-0a7/key_type.adoc[key&lowbar;type] const& key);
----

[.small]#xref:bsl/map-0a7/operator_subs-0d.adoc[_» more&period;&period;&period;_]#

Return mapped&hyphen;value access for an equivalent lookup 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/map-0a7/operator_subs-08.adoc[operator&lsqb;&rsqb;](LOOKUP&lowbar;KEY&& key)
requires BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;COMPARATOR,
                                                   LOOKUP&lowbar;KEY&gt;&colon;&colon;value;
----

[.small]#xref:bsl/map-0a7/operator_subs-08.adoc[_» more&period;&period;&period;_]#

== Return Value

modifiable reference to the mapped value

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key*
| key whose mapped value is accessed or inserted
|===


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