Template Class IndexIterator

Class Documentation

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

a forward iterator along the cells C of a vector linked by the index in the member Next, on the items V in the member Value; -1 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

IndexIterator(void) = default
inline IndexIterator(Cells *A, int c)
template<bool K>
inline IndexIterator(const IndexIterator<C, V, Next, Value, K> &o)

the constant iterator from the mutable one

inline reference operator*(void) const
inline pointer operator->(void) const
inline IndexIterator &operator++(void)
inline IndexIterator operator++(int)
inline bool operator==(const IndexIterator &o) const

equal on the same cell; any two ends are equal

inline Cells *cells(void) const
inline int index(void) const