Struct flattened_rangenest::cursor

Nested Relationships

This struct is a nested type of Template Class flattened_rangenest.

Struct Documentation

struct cursor

the cursor type

Public Functions

cursor() = default

constructs an uninitialized cursor

inline cursor(RangeNest *range)

constructs a cursor pointing to the begin, if range is not empty

Note

has O(1) complexity

inline cursor(RangeNest *range, ranges::default_sentinel_t)

constructs a cursor pointing to the end

Note

has O(1) complexity

inline cursor(RangeNest *range, typename RangeNest::iterator range_iter, typename Range::iterator elem_iter)

constructs a cursor pointing to particular range_iter and elem_iter

Note

has O(N) complexity due to the need to compute the ordinal

inline const auto &read() const
inline bool equal(const cursor &that) const
inline void next()
inline const auto range_iter() const
Returns:

the iterator pointing to the range in which this is located

inline const auto range_ordinal() const
Returns:

ordinal index of the range in which this is located

inline const auto elem_iter() const
Returns:

the iterator pointing to the element at which this is located

inline const auto ordinal() const
Returns:

ordinal index of the element at which this is located (i.e. distance to the first element of the first range)

inline void erase()

calls erase on the current iterator

template<typename T>
inline void insert(T &&elem)

calls insert on the current iterator