[#nlohmann-ordered_map-operator_subs-0a]
= xref:nlohmann.adoc[nlohmann]::xref:nlohmann/ordered_map.adoc[ordered&lowbar;map]::operator&lsqb;&rsqb;
:relfileprefix: ../../
:mrdocs:

accesses the element with the given key, inserting a default&hyphen;constructed value if it does not exist

== Synopsis

Declared in `&lt;nlohmann&sol;ordered&lowbar;map&period;hpp&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
T&
operator&lsqb;&rsqb;(xref:nlohmann/ordered_map/key_type.adoc[key&lowbar;type] const& key);
----

== Return Value

reference to the value associated with _key_

== Parameters

[cols="1,4"]
|===
| Name| Description
| *key* [in]
| key of the element to access
|===


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