SyTen

◆ visit_top_rec() [2/3]

template<typename T >
template<typename Func , typename PtrType >
static std::result_of<Func(PtrType)>::type syten::BinaryTree::Tree< T >::visit_top_rec ( Func &&  f,
typename std::result_of< Func(PtrType)>::type  initial,
IterFirst const  dir,
PtrType  ptr 
)
inlinestatic

Recursively visits a subtree, top-first for const trees.

Parameters
ffunction to call on each pointer to a node
initialinitial value of the accumulator
dirleft or right subtree first?
ptrpointer to root of subtree
Returns
the accumulated value from this node and each branch

Referenced by syten::BinaryTree::Tree< T >::visit_top(), and syten::BinaryTree::Tree< T >::visit_top_rec().

+ Here is the caller graph for this function: