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

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;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class NODE&lowbar;COMPARATOR&gt;
static
int
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]#Created with https://www.mrdocs.com[MrDocs]#
