Ruby 4.1.0dev (2026-10-21 revision fa2fee5a1d8a80586a0a0ac38e184e0d6622673e)
Public Types | Public Member Functions | Friends
prism::detail::next_range< T, Next >::iterator Class Reference

Steps through the items one after another. More...

#include <parser.hpp>

Public Types

using iterator_category = std::forward_iterator_tag
 The iterator category, for the standard algorithms.
 
using value_type = const T *
 The type of each element.
 
using difference_type = std::ptrdiff_t
 The type of the distance between two iterators.
 
using pointer = const value_type *
 The type of a pointer to an element.
 
using reference = const value_type &
 The type of a reference to an element.
 

Public Member Functions

 iterator () noexcept=default
 Create the iterator that marks the end of the items.
 
 iterator (const T *current) noexcept
 Create an iterator at the given item.
 
reference operator* () const noexcept
 The item at this position, which must not be the end.
 
iterator & operator++ () noexcept
 Advance to the next item.
 
iterator operator++ (int) noexcept
 Advance to the next item, returning the iterator from before.
 

Friends

bool operator== (iterator left, iterator right) noexcept
 Whether the two iterators are at the same item.
 
bool operator!= (iterator left, iterator right) noexcept
 Whether the two iterators are at different items.
 

Detailed Description

template<typename T, const T *(*)(const T *) Next>
class prism::detail::next_range< T, Next >::iterator

Steps through the items one after another.

Definition at line 108 of file parser.hpp.

Member Typedef Documentation

◆ difference_type

template<typename T , const T *(*)(const T *) Next>
using prism::detail::next_range< T, Next >::iterator::difference_type = std::ptrdiff_t

The type of the distance between two iterators.

Definition at line 117 of file parser.hpp.

◆ iterator_category

template<typename T , const T *(*)(const T *) Next>
using prism::detail::next_range< T, Next >::iterator::iterator_category = std::forward_iterator_tag

The iterator category, for the standard algorithms.

Definition at line 111 of file parser.hpp.

◆ pointer

template<typename T , const T *(*)(const T *) Next>
using prism::detail::next_range< T, Next >::iterator::pointer = const value_type *

The type of a pointer to an element.

Definition at line 120 of file parser.hpp.

◆ reference

template<typename T , const T *(*)(const T *) Next>
using prism::detail::next_range< T, Next >::iterator::reference = const value_type &

The type of a reference to an element.

Definition at line 123 of file parser.hpp.

◆ value_type

template<typename T , const T *(*)(const T *) Next>
using prism::detail::next_range< T, Next >::iterator::value_type = const T *

The type of each element.

Definition at line 114 of file parser.hpp.

Constructor & Destructor Documentation

◆ iterator() [1/2]

template<typename T , const T *(*)(const T *) Next>
prism::detail::next_range< T, Next >::iterator::iterator ( )
defaultnoexcept

Create the iterator that marks the end of the items.

◆ iterator() [2/2]

template<typename T , const T *(*)(const T *) Next>
prism::detail::next_range< T, Next >::iterator::iterator ( const T *  current)
inlineexplicitnoexcept

Create an iterator at the given item.

Parameters
currentThe current item.

Definition at line 133 of file parser.hpp.

Member Function Documentation

◆ operator*()

template<typename T , const T *(*)(const T *) Next>
reference prism::detail::next_range< T, Next >::iterator::operator* ( ) const
inlinenoexcept

The item at this position, which must not be the end.

Returns
The current item.

Definition at line 140 of file parser.hpp.

◆ operator++() [1/2]

template<typename T , const T *(*)(const T *) Next>
iterator & prism::detail::next_range< T, Next >::iterator::operator++ ( )
inlinenoexcept

Advance to the next item.

Returns
The iterator after advancing.

Definition at line 148 of file parser.hpp.

◆ operator++() [2/2]

template<typename T , const T *(*)(const T *) Next>
iterator prism::detail::next_range< T, Next >::iterator::operator++ ( int  )
inlinenoexcept

Advance to the next item, returning the iterator from before.

Returns
The iterator from before advancing.

Definition at line 160 of file parser.hpp.

Friends And Related Symbol Documentation

◆ operator!=

template<typename T , const T *(*)(const T *) Next>
bool operator!= ( iterator  left,
iterator  right 
)
friend

Whether the two iterators are at different items.

Definition at line 170 of file parser.hpp.

◆ operator==

template<typename T , const T *(*)(const T *) Next>
bool operator== ( iterator  left,
iterator  right 
)
friend

Whether the two iterators are at the same item.

Definition at line 167 of file parser.hpp.


The documentation for this class was generated from the following file: