counting_iterator.rst 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. .. 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. +++++++++++++++++++
  5. Counting Iterator
  6. +++++++++++++++++++
  7. :Author: David Abrahams, Jeremy Siek, Thomas Witt
  8. :Contact: dave@boost-consulting.com, jsiek@osl.iu.edu, witt@ive.uni-hannover.de
  9. :organization: `Boost Consulting`_, Indiana University `Open Systems
  10. Lab`_, University of Hanover `Institute for Transport
  11. Railway Operation and Construction`_
  12. :date: $Date$
  13. :copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003.
  14. .. _`Boost Consulting`: http://www.boost-consulting.com
  15. .. _`Open Systems Lab`: http://www.osl.iu.edu
  16. .. _`Institute for Transport Railway Operation and Construction`: http://www.ive.uni-hannover.de
  17. :abstract: How would you fill up a vector with the numbers zero
  18. through one hundred using ``std::copy()``? The only iterator
  19. operation missing from builtin integer types is an
  20. ``operator*()`` that returns the current value of the integer.
  21. The counting iterator adaptor adds this crucial piece of
  22. functionality to whatever type it wraps. One can use the
  23. counting iterator adaptor not only with integer types, but with
  24. any incrementable type.
  25. .. include:: counting_iterator_abstract.rst
  26. .. contents:: Table of Contents
  27. ``counting_iterator`` synopsis
  28. ..............................
  29. .. include:: counting_iterator_ref.rst
  30. .. include:: make_counting_iterator.rst
  31. .. include:: counting_iterator_eg.rst
  32. .. _iterator-category: iterator_facade.html#iterator-category
  33. .. |iterator-category| replace:: *iterator-category*