[#BloombergLP-bslalg-RbTreeUtil-validateRbTree-0b]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/RbTreeUtil.adoc[RbTreeUtil]::validateRbTree
:relfileprefix: ../../../
:mrdocs:

`validateRbTree` overloads

== Synopses

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

Return the (common) number of black nodes on each path from the specified `rootNode` to a leaf in the tree, 0 if `rootNode` is 0, and a negative number if `rootNode` does not refer to a valid red&hyphen;black binary search tree, ordered according to the specified `comparator`&period; Optionally specify `errorNode` and `errorDescription` in which to load the address of a node violating a red&hyphen;black tree constraint and a description of that violation, respectively&period; The behavior is undefined unless `rootNode` is 0, or refers to a valid binary tree&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class NODE&lowbar;COMPARATOR&gt;
static
int
xref:BloombergLP/bslalg/RbTreeUtil/validateRbTree-05.adoc[validateRbTree](
    xref:BloombergLP/bslalg/RbTreeNode.adoc[RbTreeNode] const* rootNode,
    NODE&lowbar;COMPARATOR const& comparator);
----

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

Return the number of black nodes on each path from the specified `rootNode` to a leaf, and load violation details into the specified `errorNode` and `errorDescription` if the tree is invalid&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class NODE&lowbar;COMPARATOR&gt;
static
int
xref:BloombergLP/bslalg/RbTreeUtil/validateRbTree-07.adoc[validateRbTree](
    xref:BloombergLP/bslalg/RbTreeNode.adoc[RbTreeNode] const** errorNode,
    char const** errorDescription,
    xref:BloombergLP/bslalg/RbTreeNode.adoc[RbTreeNode] const* rootNode,
    NODE&lowbar;COMPARATOR const& comparator);
----

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


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