validateRbTree overloads
Synopses
Declared in <bslalg_rbtreeutil.h>
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‐black binary search tree, ordered according to the specified comparator. Optionally specify errorNode and errorDescription in which to load the address of a node violating a red‐black tree constraint and a description of that violation, respectively. The behavior is undefined unless rootNode is 0, or refers to a valid binary tree.
template<class NODE_COMPARATOR>
static
int
validateRbTree(
RbTreeNode const* rootNode,
NODE_COMPARATOR const& comparator);
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.
template<class NODE_COMPARATOR>
static
int
validateRbTree(
RbTreeNode const** errorNode,
char const** errorDescription,
RbTreeNode const* rootNode,
NODE_COMPARATOR const& comparator);
Created with MrDocs