Template Class LinkedIterator

Class Documentation

template<class C, class V, C *C::* Next, V C::* Value, bool Const = true>
class LinkedIterator

a forward iterator along the cells C linked by the member Next, on the items V in the member Value; nil is the end

Public Types

using iterator_category = std::forward_iterator_tag
using value_type = V
using difference_type = std::ptrdiff_t
using reference = std::conditional_t<Const, const V&, V&>
using pointer = std::conditional_t<Const, const V*, V*>

Public Functions

LinkedIterator(void) = default
inline explicit LinkedIterator(Cell *c)
template<bool K>
inline LinkedIterator(const LinkedIterator<C, V, Next, Value, K> &o)

the constant iterator from the mutable one

inline reference operator*(void) const
inline pointer operator->(void) const
inline LinkedIterator &operator++(void)
inline LinkedIterator operator++(int)
bool operator==(const LinkedIterator &o) const = default
inline Cell *cell(void) const

the cell of the item, nil at the end