BloombergLP::bslalg::RbTreeUtil::deleteTree

Call nodeFactory->deleteNode on each node in tree and reset tree to an empty state. FACTORY shall be a class providing a method that can be called as if it has the following signature: ` void deleteNode(RbTreeNode *); ` The behavior is undefined unless tree is a valid binary tree, and nodeFactory->deleteNode does not throw.

Synopsis

Declared in <bslalg_rbtreeutil.h>

template<class FACTORY>
static
void
deleteTree(
    RbTreeAnchor* tree,
    FACTORY* nodeFactory);