[#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 black&hyphen;node depth of a valid red&hyphen;black 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 black&hyphen;node depth, loading violation details if 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;_]#

== Return Value

black&hyphen;node depth, 0 if `rootNode` is 0, or a negative number if invalid

== Parameters

[cols="1,4"]
|===
| Name| Description
| *rootNode*
| root of the tree to validate, or 0
| *comparator*
| functor used to order nodes in the tree
| *errorNode*
| set to a node that violates a red&hyphen;black constraint
| *errorDescription*
| set to a description of the violation
|===


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