[#BloombergLP-bdlb-AlgorithmWorkaroundUtil-upperBound-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlb.adoc[bdlb]::xref:BloombergLP/bdlb/AlgorithmWorkaroundUtil.adoc[AlgorithmWorkaroundUtil]::upperBound
:relfileprefix: ../../../
:mrdocs:

Returns an iterator pointing to the first element in the range starting at the specified `first` iterator and ending immediately before the specified `last` iterator, that is greater than the specified `value` as determined by the specified `comp`, or `last` if no such element is found&period; This method works around a deficiency in the STLPort standard library that prevents using `upper&lowbar;bound` to search for a value of a different type than that held in the range being searched (even if an appropriate `operator&lt;` is defined)&period; See DRQS 139734639&period;

== Synopsis

Declared in `&lt;bdlb&lowbar;algorithmworkaroundutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class FORWARD&lowbar;IT,
    class TYPE,
    class COMPARE&gt;
static
FORWARD&lowbar;IT
upperBound(
    FORWARD&lowbar;IT first,
    FORWARD&lowbar;IT last,
    TYPE const& value,
    COMPARE comp);
----


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