indirect_iterator_abstract.rst 653 B

123456789101112131415
  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. ``indirect_iterator`` adapts an iterator by applying an
  5. *extra* dereference inside of ``operator*()``. For example, this
  6. iterator adaptor makes it possible to view a container of pointers
  7. (e.g. ``list<foo*>``) as if it were a container of the pointed-to type
  8. (e.g. ``list<foo>``). ``indirect_iterator`` depends on two
  9. auxiliary traits, ``pointee`` and ``indirect_reference``, to
  10. provide support for underlying iterators whose ``value_type`` is
  11. not an iterator.