Class Subspace :: sus :: iter :: IteratorOverRange
The iterator created from a std::range
via
from_range
.
Methods
sus::mem::Clone trait.
sus::iter::ExactSizeIterator trait.
sus::mem::Move<Item>
!std::is_const_v<std::remove_reference_t<Item>>
Creates an iterator which moves all of its elements. If the range does not own its elements, or the elements are used afterward, this can cause use- after-move and Undefined Behaviour.
If the range owns the elements being iterated over (such as with a
std::vector
) then
the elements can be moved out of the range. This converts the iterator
from being over T&
to being over values of type T
.
Subspace collections can be consumed (moved-from) to make an iterator,
which helps prevent use-after-move of the elements within, and avoids the
need for an adaptor like moved
.
Safety
The elements in the view being iterated over will be moved from, and must not be used afterward in a way that the types do not support. The range should own the elements being iterated over, and then cleared or destroyed after iteration.
sus::iter::Iterator trait.
sus::iter::DoubleEndedIterator trait.
sus::iter::Iterator trait.