#include <itertools/range.hpp>
Const iterator type for itertools::range.
Definition at line 176 of file range.hpp.
|
using | difference_type = std::ptrdiff_t |
| Difference type.
|
|
using | iterator_category = std::forward_iterator_tag |
| Iterator category.
|
|
using | pointer = value_type * |
| Pointer type.
|
|
using | reference = value_type const & |
| Reference type.
|
|
using | value_type = long |
| Value type.
|
|
|
bool | atEnd () const noexcept |
| Has the iterator reached the end of the range?
|
|
bool | operator!= (const_iterator const &other) const noexcept |
| Not-equal-to operator for two iterators.
|
|
long | operator* () const noexcept |
| Dereference operator.
|
|
const_iterator & | operator++ () noexcept |
| Pre-increment operator increments the current value by the step size.
|
|
const_iterator | operator++ (int) noexcept |
| Post-increment operator increments the current value by the step size.
|
|
long | operator-> () const noexcept |
| Member access operator.
|
|
bool | operator== (const_iterator const &other) const noexcept |
| Equal-to operator for two iterators.
|
|
|
long | last |
| Last value of the range (excluded).
|
|
long | pos |
| Current value.
|
|
long | step |
| Step size.
|
|
◆ atEnd()
bool itertools::range::const_iterator::atEnd |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Has the iterator reached the end of the range?
- Returns
- True, if the current value of the iterator is >= the last value of the range for positive step size or if the current value of the iterator is <= the last value of the range for negative step size.
Definition at line 225 of file range.hpp.
◆ operator!=()
bool itertools::range::const_iterator::operator!= |
( |
const_iterator const & | other | ) |
const |
|
inlinenodiscardnoexcept |
Not-equal-to operator for two iterators.
- Parameters
-
other | Iterator to compare with. |
- Returns
- True, if the iterators are not equal.
Definition at line 243 of file range.hpp.
◆ operator*()
long itertools::range::const_iterator::operator* |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Dereference operator.
- Returns
- Current value of the iterator.
Definition at line 249 of file range.hpp.
◆ operator++() [1/2]
Pre-increment operator increments the current value by the step size.
- Returns
- Reference to the incremented iterator.
Definition at line 205 of file range.hpp.
◆ operator++() [2/2]
Post-increment operator increments the current value by the step size.
- Returns
- Copy of the iterator before incrementing.
Definition at line 214 of file range.hpp.
◆ operator->()
long itertools::range::const_iterator::operator-> |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Member access operator.
- Returns
- Current value of the iterator.
Definition at line 255 of file range.hpp.
◆ operator==()
bool itertools::range::const_iterator::operator== |
( |
const_iterator const & | other | ) |
const |
|
inlinenodiscardnoexcept |
Equal-to operator for two iterators.
- Parameters
-
other | Iterator to compare with. |
- Returns
- True, if the current values of both iterators are equal or both iterators are at the end of the range.
Definition at line 233 of file range.hpp.
The documentation for this struct was generated from the following file: