|
ZipIterator & | operator++ () |
| Increment by prefix. More...
|
|
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. More...
|
|
ZipIterator | operator++ (int) |
| Increment by postfix. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
const reference | operator* () const |
| Dereference this iterator at its current position. More...
|
|
reference | operator* () |
| Dereference this iterator at its current position. More...
|
|
const pointer | operator-> () const |
| Indirect this pointer at its current position. More...
|
|
pointer | operator-> () |
| Indirect this pointer at its current position. More...
|
|
| ZipIterator ()=default |
| Default-construct a zip iterator. Dereferencing it is undefined. More...
|
|
| ZipIterator (const ZipIterator &other)=default |
| Copy-construct a zip iterator. More...
|
|
| ZipIterator (ZipIterator &&other)=default |
| Move-construct a zip iterator. More...
|
|
ZipIterator & | operator= (ZipIterator &&other)=default |
| Move-assign a zip iterator. More...
|
|
ZipIterator & | operator= (const ZipIterator &other)=default |
| Copy-assign a zip iterator. More...
|
|
| ZipIterator (Iters... iters) |
| Construct from a pack of iterators. More...
|
|
template<typename... Iterators> |
| ZipIterator (std::tuple< Iterators... > iters) |
| Construct from a tuple of iterators. More...
|
|
template<typename... It> |
bool | operator== (const ZipIterator< It... > &other) const |
| Compare this object with another zip iterator. More...
|
|
template<typename... It> |
bool | operator!= (const ZipIterator< It... > &other) const |
| Compare this object with another zip iterator. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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. More...
|
|
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 More...
|
|
| ~ZipIterator ()=default |
| Destroy this object. More...
|
|
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. |