[#BloombergLP-bdlc-PackedIntArrayUtil-upperBound]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/PackedIntArrayUtil.adoc[PackedIntArrayUtil]::upperBound
:relfileprefix: ../../../
:mrdocs:

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

== Synopsis

Declared in `&lt;bdlc&lowbar;packedintarrayutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TYPE&gt;
static
xref:BloombergLP/bdlc/PackedIntArrayConstIterator.adoc[PackedIntArrayConstIterator&lt;TYPE&gt;]
upperBound(
    xref:BloombergLP/bdlc/PackedIntArrayConstIterator.adoc[PackedIntArrayConstIterator&lt;TYPE&gt;] first,
    xref:BloombergLP/bdlc/PackedIntArrayConstIterator.adoc[PackedIntArrayConstIterator&lt;TYPE&gt;] last,
    TYPE value);
----

== Description

Return an iterator to the first element in the sorted range from the specified `first` (inclusive) to the specified `last` (exclusive) that compares greater than the specified `value`, and `last` if no such element exists&period; The behavior is undefined unless `first &lt;&equals; last` and the range is sorted&period;

== Return Value

iterator to the first element greater than `value`, or `last` if no such element exists

== Parameters

[cols="1,4"]
|===
| Name| Description
| *first*
| beginning of the sorted range to search
| *last*
| end of the sorted range to search
| *value*
| value to compare against elements in the range
|===


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