...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
boost::compute::zip_iterator — A zip iterator adaptor.
// In header: <boost/compute/iterator/zip_iterator.hpp> template<typename IteratorTuple> class zip_iterator { public: // types typedef unspecified super_type; typedef super_type::value_type value_type; typedef super_type::reference reference; typedef super_type::difference_type difference_type; typedef IteratorTuple iterator_tuple; // construct/copy/destruct zip_iterator(IteratorTuple); zip_iterator(const zip_iterator< IteratorTuple > &); zip_iterator< IteratorTuple > & operator=(const zip_iterator< IteratorTuple > &); ~zip_iterator(); // public member functions const IteratorTuple & get_iterator_tuple() const; template<typename IndexExpression> unspecified operator[](const IndexExpression &) const; // private member functions reference dereference() const; bool equal(const zip_iterator< IteratorTuple > &) const; void increment(); void decrement(); void advance(difference_type); difference_type distance_to(const zip_iterator< IteratorTuple > &) const; };
The zip_iterator class combines values from multiple input iterators. When dereferenced it returns a tuple containing each value at the current position in each input range.
See Also:
make_zip_iterator()
zip_iterator
public
construct/copy/destructzip_iterator(IteratorTuple iterators);
zip_iterator(const zip_iterator< IteratorTuple > & other);
zip_iterator< IteratorTuple > & operator=(const zip_iterator< IteratorTuple > & other);
~zip_iterator();
zip_iterator
private member functionsreference dereference() const;
bool equal(const zip_iterator< IteratorTuple > & other) const;
void increment();
void decrement();
void advance(difference_type n);
difference_type distance_to(const zip_iterator< IteratorTuple > & other) const;