Shortcuts

Template Struct Range::IteratorImpl

Nested Relationships

This struct is a nested type of Template Class Range.

Struct Documentation

template<bool IsConst>
struct ripple::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.

using Reference = std::conditional_t<IsConst, const T&, T&>

Defines the type of a reference.

using Pointer = std::conditional_t<IsConst, const T*, T*>

Defines the type of a pointer.

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*() noexcept -> Reference

Returns a reference to the value of the iterator.

constexpr auto operator->() noexcept -> Pointer

Returns a pointer to the value of the 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.

constexpr auto operator!=(const Self &other) noexcept -> bool

Overload of the inequality operator to check if two iterators are not equivalent.

Return

true if the value of this iterator is less than the value of other, false otherwise.

Parameters
  • other: The other iterator to compare with.

Docs

Access comprehensive developer documentation for Ripple

View Docs

Tutorials

Get tutorials to help with understand all features

View Tutorials

Examples

Find examples to help get started

View Examples