|
ZipIterator & | operator++ () |
| Increment by prefix.
|
|
template<typename category = iterator_category, typename std::enable_if_t< std::is_base_of_v< std::bidirectional_iterator_tag, category >, int > = 0> |
ZipIterator & | operator-- () |
| Decrement by prefix.
|
|
ZipIterator | operator++ (int) |
| Increment by postfix.
|
|
template<typename category = iterator_category, typename std::enable_if_t< std::is_base_of_v< std::bidirectional_iterator_tag, category >, int > = 0> |
ZipIterator | operator-- (int) |
| Decrement by postfix.
|
|
template<typename category = iterator_category, typename std::enable_if_t< std::is_base_of_v< std::random_access_iterator_tag, category >, int > = 0> |
ZipIterator | operator+ (const difference_type n) const |
| Increment by a number of steps.
|
|
template<typename category = iterator_category, typename std::enable_if_t< std::is_base_of_v< std::random_access_iterator_tag, category >, int > = 0> |
ZipIterator | operator- (const difference_type n) const |
| Decrement by a number of steps.
|
|
template<typename category = iterator_category, typename std::enable_if_t< std::is_base_of_v< std::random_access_iterator_tag, category >, int > = 0> |
difference_type | operator- (const ZipIterator &other) const |
| Compute the difference between two iterators.
|
|
template<typename category = iterator_category, typename std::enable_if_t< std::is_base_of_v< std::random_access_iterator_tag, category >, int > = 0> |
ZipIterator & | operator+= (const difference_type n) |
| Increment in-place by a number of steps.
|
|
template<typename category = iterator_category, typename std::enable_if_t< std::is_base_of_v< std::random_access_iterator_tag, category >, int > = 0> |
ZipIterator & | operator-= (const difference_type n) |
| Decrement in-place by a number of steps.
|
|
const reference | operator* () const |
| Dereference this iterator at its current position.
|
|
reference | operator* () |
| Dereference this iterator at its current position.
|
|
const pointer | operator-> () const |
| Indirect this pointer at its current position.
|
|
pointer | operator-> () |
| Indirect this pointer at its current position.
|
|
| ZipIterator ()=default |
| Default-construct a zip iterator. Dereferencing it is undefined.
|
|
| ZipIterator (const ZipIterator &other)=default |
| Copy-construct a zip iterator.
|
|
| ZipIterator (ZipIterator &&other)=default |
| Move-construct a zip iterator.
|
|
ZipIterator & | operator= (ZipIterator &&other)=default |
| Move-assign a zip iterator.
|
|
ZipIterator & | operator= (const ZipIterator &other)=default |
| Copy-assign a zip iterator.
|
|
| ZipIterator (Iters... iters) |
| Construct from a pack of iterators.
|
|
template<typename... Iterators> |
| ZipIterator (std::tuple< Iterators... > iters) |
| Construct from a tuple of iterators.
|
|
template<typename... It> |
bool | operator== (const ZipIterator< It... > &other) const |
| Compare this object with another zip iterator.
|
|
template<typename... It> |
bool | operator!= (const ZipIterator< It... > &other) const |
| Compare this object with another zip iterator.
|
|
template<typename category = iterator_category, typename std::enable_if_t< std::is_base_of_v< std::random_access_iterator_tag, category >, int > = 0> |
bool | operator< (const ZipIterator &other) const |
| Less-than compare this object with another zip iterator.
|
|
template<typename category = iterator_category, typename std::enable_if_t< std::is_base_of_v< std::random_access_iterator_tag, category >, int > = 0> |
bool | operator<= (const ZipIterator &other) const |
| Less-than or equal compare this object with another zip iterator.
|
|
template<typename category = iterator_category, typename std::enable_if_t< std::is_base_of_v< std::random_access_iterator_tag, category >, int > = 0> |
bool | operator> (const ZipIterator &other) const |
| Greater-than compare this object with another zip iterator.
|
|
template<typename category = iterator_category, typename std::enable_if_t< std::is_base_of_v< std::random_access_iterator_tag, category >, int > = 0> |
bool | operator>= (const ZipIterator &other) const |
| Greater-than or equal compare this object with another zip iterator.
|
|
template<typename category = iterator_category, typename std::enable_if_t< std::is_base_of_v< std::random_access_iterator_tag, category >, int > = 0> |
reference | operator[] (const difference_type n) const |
| offset dereference operator for purely random accesss iterators held by ZipIterator
|
|
| ~ZipIterator ()=default |
| Destroy this object.
|
|
template<typename... Iters>
class Utopia::Itertools::ZipIterator< Iters >
Iterator over an arbitrary number of collections.
This object stores an iterator for each collection it iterates over and obeys the lowest-level iterator category of all inserted iterators.
Most operations on this iterator are forwarded to the underlying iterators. Dereferencing packs the resulting references to values of the collections into an std::tuple
and returns it.
- Note
- This iterator is invalidated as soon as any of the underlying iterators is invalidated.
- Template Parameters
-
Iters | The types of iterators used within this object. |