[#BloombergLP-bslalg-RbTreeUtil-lowerBound-00]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/RbTreeUtil.adoc[RbTreeUtil]::lowerBound
:relfileprefix: ../../../
:mrdocs:

`lowerBound` overloads

== Synopses

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

Same as the preceding `lowerBound` overload, returning a modifiable node&period;


[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]*
xref:BloombergLP/bslalg/RbTreeUtil/lowerBound-03.adoc[lowerBound](
    xref:BloombergLP/bslalg/RbTreeAnchor.adoc[RbTreeAnchor]& tree,
    NODE&lowbar;VALUE&lowbar;COMPARATOR& comparator,
    VALUE const& value);
----

[.small]#xref:BloombergLP/bslalg/RbTreeUtil/lowerBound-03.adoc[_» more&period;&period;&period;_]#

Return the address of the leftmost node holding the smallest value greater&hyphen;than or equal&hyphen;to `value` in the specified `tree` (organized according to the specified &apos;comparator) if found, and return `tree&period;sentinel()` if `value` is greater&hyphen;than the rightmost node in `tree`&period; `COMPARATOR` shall be a functor providing two methods that can be called as if they had the following signatures&colon; &grave; bool operator()(const RbTreeNode&amp;, const VALUE&amp;) const&semi; bool operator()(const VALUE&amp;, const RbTreeNode&amp;) const&semi; &grave; The behavior is undefined unless `comparator` provides a strict weak ordering on objects of type `VALUE`, and `tree` is well&hyphen;formed (`isWellFormed`)&period; Note that this function returns the _first_ position before which `value` could be inserted into `tree` while preserving its ordering&period;


[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] const*
xref:BloombergLP/bslalg/RbTreeUtil/lowerBound-0c.adoc[lowerBound](
    xref:BloombergLP/bslalg/RbTreeAnchor.adoc[RbTreeAnchor] const& tree,
    NODE&lowbar;VALUE&lowbar;COMPARATOR& comparator,
    VALUE const& value);
----

[.small]#xref:BloombergLP/bslalg/RbTreeUtil/lowerBound-0c.adoc[_» more&period;&period;&period;_]#


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