zip_iterator_abstract.rst 1.2 KB

1234567891011121314151617181920
  1. .. Copyright David Abrahams 2006. Distributed under the Boost
  2. .. Software License, Version 1.0. (See accompanying
  3. .. file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  4. The zip iterator provides the ability to parallel-iterate
  5. over several controlled sequences simultaneously. A zip
  6. iterator is constructed from a tuple of iterators. Moving
  7. the zip iterator moves all the iterators in parallel.
  8. Dereferencing the zip iterator returns a tuple that contains
  9. the results of dereferencing the individual iterators.
  10. The tuple of iterators is now implemented in terms of a Boost fusion sequence.
  11. Because of this the 'tuple' may be any Boost fusion sequence and, for backwards
  12. compatibility through a Boost fusion sequence adapter, a Boost tuple. Because the
  13. 'tuple' may be any boost::fusion sequence the 'tuple' may also be any type for which a
  14. Boost fusion adapter exists. This includes, among others, a std::tuple and a std::pair.
  15. Just remember to include the appropriate Boost fusion adapter header files for these
  16. other Boost fusion adapters. The zip_iterator header file already includes the
  17. Boost fusion adapter header file for Boost tuple, so you need not include it yourself
  18. to use a Boost tuple as your 'tuple'.