Template Struct Range::IteratorImpl¶
Defined in File range.hpp
Nested Relationships¶
This struct is a nested type of Template Class Range.
Struct Documentation¶
-
template<bool
IsConst
>
structripple::Range
::
IteratorImpl
¶ The Iterator class defines an iterator for iterating over a range.
- Template Parameters
IsConst
: If the iterator is constant.
Public Types
-
using
Self
= IteratorImpl<IsConst>¶ Defines the type of the iterator.
-
using
IterValue
= std::decay_t<T>¶ Defines the type of the iterator data.
Public Functions
-
constexpr
IteratorImpl
(IterValue value, IterValue step) noexcept¶ Sets the value of the iterator and the step size.
- Parameters
value
: The value for the iterator.step
: The size of the steps for the iterator.
-
constexpr auto
operator++
() noexcept -> Self¶ Overload of increment operator to move the iterator forward by the step size.
This overload is for the postfix operator and returns the old value of the iterator.
-
constexpr auto
operator++
(int) noexcept -> Self¶ Overload of increment operator to move the iterator forward by the step size.
This overload is for the prefix operator and returns the updated iterator.
-
constexpr auto
operator==
(const Self &other) noexcept -> bool¶ Overload of the equality operator to check if two iterators are equivalent.
- Return
true if the value of this iterator is greater than the or equal to the value of the other iterator, false otherwise.
- Parameters
other
: The other iterator to compare with.