[#bsl-map-0a7-upper_bound-0e]
= xref:bsl.adoc[bsl]::xref:bsl/map-0a7.adoc[map]::upper&lowbar;bound
:relfileprefix: ../../
:mrdocs:

Return an iterator to the first element with key greater than `key`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class LOOKUP&lowbar;KEY&gt;
xref:bsl/map-0a7/iterator.adoc[iterator]
upper&lowbar;bound(LOOKUP&lowbar;KEY const& key)
requires BloombergLP&colon;&colon;bslmf&colon;&colon;IsTransparentPredicate&lt;COMPARATOR,
                                                   LOOKUP&lowbar;KEY&gt;&colon;&colon;value;
----

== Description

Return an iterator providing modifiable access to the first (i&period;e&period;, ordered least) `value&lowbar;type` object in this map whose key is greater than the specified `key`, and the past&hyphen;the&hyphen;end iterator if this map does not contain a `value&lowbar;type` object whose key is greater&hyphen;than `key`&period; Note that this function returns the _last_ position before which a `value&lowbar;type` object having an equivalent key could be inserted into the ordered sequence maintained by this map, while preserving its ordering&period;

== Return Value

iterator to the upper bound, or `end()`

== Parameters

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


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