[#BloombergLP-bslalg-RbTreeUtil-upperBound-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/RbTreeUtil.adoc[RbTreeUtil]::upperBound
:relfileprefix: ../../../
:mrdocs:

Return the first node ordered after `value`, or the sentinel&period;

== Synopsis

Declared in `&lt;bslalg&lowbar;rbtreeutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class NODE&lowbar;VALUE&lowbar;COMPARATOR,
    class VALUE&gt;
static
xref:BloombergLP/bslalg/RbTreeNode.adoc[RbTreeNode]*
upperBound(
    xref:BloombergLP/bslalg/RbTreeAnchor.adoc[RbTreeAnchor]& tree,
    NODE&lowbar;VALUE&lowbar;COMPARATOR& comparator,
    VALUE const& value);
----

== Description

Return the address of the leftmost node holding the smallest value greater&hyphen;than `value` in the specified `tree`&period;

== Return Value

address of the first node ordered after `value`, or the sentinel

== Parameters

[cols="1,4"]
|===
| Name| Description
| *tree*
| tree to search
| *comparator*
| functor used to order nodes against `value`
| *value*
| value whose upper bound is returned
|===


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