[#BloombergLP-bslalg-RbTreeUtil-rightmost-025]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/RbTreeUtil.adoc[RbTreeUtil]::rightmost
:relfileprefix: ../../../
:mrdocs:

Return the address of the rightmost node in the specified `subtree`, and `subtree` if `subtree` has no right child&period; The behavior is undefined unless `0 !&equals; subtree` and `subtree` refers to a valid binary tree&period; Note that the value held by the returned node will not compare less than that of any other node in `subtree` (as determined by the comparator used to organize the red&hyphen;black subtree data)&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
xref:BloombergLP/bslalg/RbTreeNode.adoc[RbTreeNode] const*
rightmost(xref:BloombergLP/bslalg/RbTreeNode.adoc[RbTreeNode] const* subtree);
----


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