#include <tpl_binNodeUtils.H>
Public Member Functions | |
template<class Op > | |
void | traverse (Node *root, Op &op) const noexcept(noexcept(op)) |
Invoke the traversal. | |
template<class Op > | |
void | operator() (Node *root, Op &op) const noexcept(noexcept(op)) |
template<class Op > | |
void | operator() (Node *root, Op &&op=Op()) const noexcept(noexcept(op)) |
Generic preorder traversal of a binary tree
For_Each_Preorder traverses a binary tree in preorder. For each is node is called an operation with the following signature:
struct Op { void operator () (Node * p) {
operation } };
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
inlinenoexcept |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.