Template Class PathIterator

Class Documentation

template<class O, class P>
class PathIterator

a bidirectional iterator on the nodes of a binary tree of the owner O in symmetric order, by the policy P with the static functions root( o ), left( n ), right( n ) (nil for no child) and read( n ); the items are constant, and the end is the empty path

Public Types

using reference = decltype(P::read(std::declval<N*>()))
using value_type = std::remove_cvref_t<reference>
using difference_type = std::ptrdiff_t
using iterator_concept = std::bidirectional_iterator_tag
using iterator_category = std::conditional_t<std::is_reference_v<reference>, std::bidirectional_iterator_tag, std::input_iterator_tag>

Public Functions

PathIterator(void) = default
inline PathIterator(const O *o, bool first)

on the first node of the tree of o if first, at the end otherwise

inline reference operator*(void) const
inline PathIterator &operator++(void)
inline PathIterator &operator--(void)
inline PathIterator operator++(int)
inline PathIterator operator--(int)
inline bool operator==(const PathIterator &o) const