Template Class SequenceRange

Nested Relationships

Nested Types

Inheritance Relationships

Base Type

  • public std::ranges::view_interface< SequenceRange< S > >

Class Documentation

template<Sequence S>
class SequenceRange : public std::ranges::view_interface<SequenceRange<S>>

the items of a SEQUENCE as a range of C++

Public Functions

SequenceRange(void) = default
inline explicit SequenceRange(const S &s)
inline iterator begin(void) const
inline iterator end(void) const

an iterator, so that the range is common and the algorithms of C++17 and of Boost take it, but no position pos_n is computed

class iterator

a position of the sequence, read by *; the end is an iterator marked as such, equal to every iterator on a finished position

Public Types

using iterator_category = std::forward_iterator_tag
using value_type = typename S::Item
using difference_type = std::ptrdiff_t
using reference = const value_type&
using pointer = const value_type*

Public Functions

iterator(void) = default
inline iterator(const S *s, typename S::Pos p)
inline reference operator*(void) const
inline pointer operator->(void) const
inline iterator &operator++(void)
inline iterator operator++(int)
inline bool operator==(std::default_sentinel_t) const

at the end, i.e., on a finished position

inline bool operator==(const iterator &o) const
inline S::Pos position(void) const

the position of the book

Public Static Functions

static inline iterator end(const S *s)

the end of the range of s