|
constexpr | lookahead_iterator (lookahead_iterator const &) noexcept=delete |
|
constexpr | lookahead_iterator (lookahead_iterator &&) noexcept=default |
|
constexpr lookahead_iterator & | operator= (lookahead_iterator const &) noexcept=delete |
|
constexpr lookahead_iterator & | operator= (lookahead_iterator &&) noexcept=default |
|
constexpr | lookahead_iterator (It first, ItEnd last) noexcept |
|
constexpr size_t | size () const noexcept |
| The number of entries can be looked ahead.
|
|
constexpr bool | empty () const noexcept |
| Check if the iterator is at end.
|
|
constexpr | operator bool () const noexcept |
|
constexpr bool | operator== (std::default_sentinel_t) const noexcept |
|
constexpr reference | operator[] (size_t i) const noexcept |
| Get a reference to an item at or beyond the iterator.
|
|
constexpr reference | at (size_t i) const |
| Get a reference to an item at or beyond the iterator.
|
|
constexpr std::optional< value_type > | next (size_t i=1) const noexcept |
| Get a reference to an item at or beyond the iterator.
|
|
constexpr reference | operator* () const noexcept |
| Get a reference to the value at the iterator.
|
|
constexpr pointer | operator-> () const noexcept |
| Get a pointer to the value at the iterator.
|
|
constexpr lookahead_iterator & | operator++ () noexcept |
| Increment the iterator.
|
|
constexpr lookahead_iterator & | operator+= (size_t n) noexcept |
|
constexpr proxy | operator++ (int) noexcept |
|
template<size_t LookaheadCount, typename It, std::sentinel_for< It > ItEnd = std::default_sentinel_t>
class hi::v1::lookahead_iterator< LookaheadCount, It, ItEnd >
Lookahead iterator.
This iterator adapter takes a forward input iterator and adapts it so that you can look ahead beyond the current position of the iterator. This is useful when writing a parser.