#include <itertools/range.hpp>
Const iterator type for itertools::range.
Definition at line 178 of file range.hpp.
|
using | difference_type = std::ptrdiff_t |
| Difference type.
|
|
using | iterator_category = std::random_access_iterator_tag |
| Iterator category.
|
|
using | pointer = value_type * |
| Pointer type.
|
|
using | reference = value_type const & |
| Reference type.
|
|
using | value_type = long |
| Value type.
|
|
|
long | pos |
| Current value.
|
|
long | step |
| Step size.
|
|
◆ operator*()
long itertools::range::const_iterator::operator* |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Dereference operator.
- Returns
- Current value of
this
iterator.
Definition at line 261 of file range.hpp.
◆ operator+()
Addition operator for an iterator and an integer.
- Parameters
-
n | Number of steps to add to the current value. |
- Returns
- Copy of
this
object with its current value increased by the step size multiplied by \( n \).
Definition at line 284 of file range.hpp.
◆ operator++() [1/2]
Pre-increment operator increments the current value by the step size.
- Returns
- Reference to
this
iterator.
Definition at line 204 of file range.hpp.
◆ operator++() [2/2]
Post-increment operator increments the current value by the step size.
- Returns
- Copy of
this
iterator before incrementing.
Definition at line 213 of file range.hpp.
◆ operator+=()
Addition assignment operator.
- Parameters
-
n | Number of steps to add to the current value. |
- Returns
- Reference to
this
iterator with its current value increased by the step size multiplied by \( n \).
Definition at line 274 of file range.hpp.
◆ operator-() [1/2]
Get the distance between two iterators.
- Parameters
-
rhs | Right-hand side iterator. |
- Returns
- Number of steps between the two iterators.
Definition at line 316 of file range.hpp.
◆ operator-() [2/2]
Subtraction operator for an iterator and an integer.
- Parameters
-
n | Number of steps to subtract from the current value. |
- Returns
- Copy of
this
iterator with its current value decreased by the step size multiplied by \( n \).
Definition at line 309 of file range.hpp.
◆ operator--() [1/2]
Pre-decrement operator decrements the current value by the step size.
- Returns
- Reference to
this
iterator.
Definition at line 223 of file range.hpp.
◆ operator--() [2/2]
Post-decrement operator decrements the current value by the step size.
- Returns
- Copy of
this
iterator before decrementing.
Definition at line 232 of file range.hpp.
◆ operator-=()
Subtraction assignment operator.
- Parameters
-
n | Number of steps to subtract from the current value. |
- Returns
- Reference to
this
iterator with its current value decreased by the step size multiplied by \( n \).
Definition at line 299 of file range.hpp.
◆ operator->()
long itertools::range::const_iterator::operator-> |
( |
| ) |
const |
|
inlinenodiscardnoexcept |
Member access operator.
- Returns
- Current value of
this
iterator.
Definition at line 267 of file range.hpp.
◆ operator<=>()
std::strong_ordering itertools::range::const_iterator::operator<=> |
( |
const_iterator const & | rhs | ) |
const |
|
inlinenodiscardnoexcept |
Three-way comparison operator for two iterators.
- Parameters
-
rhs | Right hand side iterator to compare with. |
- Returns
- If the step size is > 0, it returns the result of a three-way comparison of their current values. Otherwise, it three-way compares their negative values.
Definition at line 245 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.
Definition at line 255 of file range.hpp.
◆ operator[]()
Subscript operator.
- Parameters
-
n | Number of steps to add to the current value. |
- Returns
- Current value increased by the step size multiplied by \( n \).
Definition at line 323 of file range.hpp.
◆ operator+
Addition operator for an integer and an iterator.
- Parameters
-
n | Number of steps to add to the current value of the iterator. |
it | Iterator. |
- Returns
- Copy of the given iterator with its current value increased by the step size multiplied by \( n \).
Definition at line 292 of file range.hpp.
The documentation for this struct was generated from the following file: