[#bsl-map-0a7-at-09]
= xref:bsl.adoc[bsl]::xref:bsl/map-0a7.adoc[map]::at
:relfileprefix: ../../
:mrdocs:

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

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
add&lowbar;lvalue&lowbar;reference&lt;VALUE const&gt;::type
at(xref:bsl/map-0a7/key_type.adoc[key&lowbar;type] const& key) const;
----

== Description

Return a reference providing non&hyphen;modifiable access to the mapped&hyphen;value associated with a key that is equivalent to the specified `key`, if such an entry exists&semi; otherwise, throw a `std&colon;&colon;out&lowbar;of&lowbar;range` exception&period; Note that this method may also throw a different kind of exception if the (user&hyphen;supplied) comparator throws&period;

== Return Value

const reference to the mapped value

== Parameters

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


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