move_iterator

namespace opentl {
    template <typename It>
    class move_iterator;
}

An iterator that yields rvalue references to the elements of the underlying iterator.

Declared in <iterator/move_iterator.hpp>.

Template Parameters

Name Description
It The iterator type.

Member Types

Type Description
iterator_type The iterator type.
difference_type The difference type.
value_type The value type.
reference The rvalue reference type yielded by the iterator.

Member Functions

Name Return Type Description
move_iterator()   move_iterator constructor.
move_iterator(iterator_type)   move_iterator constructor.
base() iterator_type Returns the underlying iterator.
operator*() reference Dereferences the underlying iterator and casts the element to an rvalue reference.
operator++() move_iterator& Increments the iterator and returns a reference to it.
operator++(int) move_iterator Increments the iterator and returns a copy of the previous iterator.
operator--() move_iterator& Decrements the iterator and returns a reference to it.
operator--(int) move_iterator Decrements the iterator and returns a copy of the previous iterator.
operator+=(difference_type) move_iterator& Advances the iterator by n and returns a reference to it.
operator-=(difference_type) move_iterator& Backtracks the iterator by n and returns a reference to it.
operator[](difference_type) reference Dereferences the element n positions ahead and casts it to an rvalue reference.

Non-member Functions

Name Return Type Description
operator+(it, n) move_iterator Returns a copy of the iterator advanced by n.
operator-(it, n) move_iterator Returns a copy of the iterator backtracked by n.
operator+(n, it) move_iterator Returns a copy of the iterator advanced by n.
operator-(lhs, rhs) ptrdiff_t Returns the number of positions between two move iterators.
operator<=> auto Compares two move iterators for equality.