<trclass="field"><thclass="field-name">organizations:</th><tdclass="field-body"><aclass="reference"href="http://www.boost-consulting.com">Boost Consulting</a>, Indiana University <aclass="reference"href="http://www.osl.iu.edu">Open Systems
<trclass="field"><thclass="field-name">copyright:</th><tdclass="field-body">Copyright David Abrahams, Jeremy Siek, Thomas Witt 2003. All rights reserved</td>
<li><aclass="reference"href="#upgrading-from-the-old-boost-iterator-adaptor-library"id="id28"name="id28">Upgrading from the old Boost Iterator Adaptor Library</a></li>
required to return a reference (and not a proxy) when dereferenced,
it is impossible to capture the capabilities of
<ttclass="literal"><spanclass="pre">vector<bool>::iterator</span></tt> using the C++98 categories. This is the
infamous "<ttclass="literal"><spanclass="pre">vector<bool></span></tt> is not a container, and its iterators
aren't random access iterators", debacle about which Herb Sutter
wrote two papers for the standards comittee (<aclass="reference"href="http://www.gotw.ca/publications/N1185.pdf">n1185</a> and <aclass="reference"href="http://www.gotw.ca/publications/N1211.pdf">n1211</a>),
and a <aclass="reference"href="http://www.gotw.ca/gotw/050.htm">Guru of the Week</a>. New-style iterators go well beyond
patching up <ttclass="literal"><spanclass="pre">vector<bool></span></tt>, though: there are lots of other
iterators already in use which can't be adequately represented by
the existing concepts. For details about the new iterator
<p>Both <ttclass="literal"><spanclass="pre">iterator_facade</span></tt> and <ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt> as well as many of the <aclass="reference"href="#specialized-adaptors">specialized
<aclass="reference"href="facade-and-adaptor.html">Standard Proposal For Iterator Facade and Adaptor</a> (<aclass="reference"href="facade-and-adaptor.pdf">PDF</a>)</blockquote>
<li><aclass="reference"href="counting_iterator.html"><ttclass="literal"><spanclass="pre">counting_iterator</span></tt></a> (<aclass="reference"href="counting_iterator.pdf">PDF</a>): an iterator over a sequence of consecutive values.
<li><aclass="reference"href="filter_iterator.html"><ttclass="literal"><spanclass="pre">filter_iterator</span></tt></a> (<aclass="reference"href="filter_iterator.pdf">PDF</a>): an iterator over the subset of elements of some
<li><aclass="reference"href="function_output_iterator.html"><ttclass="literal"><spanclass="pre">function_output_iterator</span></tt></a> (<aclass="reference"href="function_output_iterator.pdf">PDF</a>): an output iterator wrapping a unary function
object; each time an element is written into the dereferenced
iterator, it is passed as a parameter to the function object.</li>
<li><aclass="reference"href="indirect_iterator.html"><ttclass="literal"><spanclass="pre">indirect_iterator</span></tt></a> (<aclass="reference"href="indirect_iterator.pdf">PDF</a>): an iterator over the objects <em>pointed-to</em> by the
<li><aclass="reference"href="permutation_iterator.html"><ttclass="literal"><spanclass="pre">permutation_iterator</span></tt></a> (<aclass="reference"href="permutation_iterator.pdf">PDF</a>): an iterator over the elements of some random-access
<li><aclass="reference"href="reverse_iterator.html"><ttclass="literal"><spanclass="pre">reverse_iterator</span></tt></a> (<aclass="reference"href="reverse_iterator.pdf">PDF</a>): an iterator which traverses the elements of some
<li><aclass="reference"href="../../utility/shared_container_iterator.html"><ttclass="literal"><spanclass="pre">shared_container_iterator</span></tt></a>: an iterator over elements of a container whose
lifetime is maintained by a <aclass="reference"href="../../smart_ptr/shared_ptr.htm"><ttclass="literal"><spanclass="pre">shared_ptr</span></tt></a> stored in the iterator.</li>
<li><aclass="reference"href="transform_iterator.html"><ttclass="literal"><spanclass="pre">transform_iterator</span></tt></a> (<aclass="reference"href="transform_iterator.pdf">PDF</a>): an iterator over elements which are the result of
<li><aclass="reference"href="zip_iterator.html"><ttclass="literal"><spanclass="pre">zip_iterator</span></tt></a> (<aclass="reference"href="zip_iterator.pdf">PDF</a>): an iterator over tuples of the elements at corresponding
<li><aclass="reference"href="pointee.html"><ttclass="literal"><spanclass="pre">pointee.hpp</span></tt></a> (<aclass="reference"href="pointee.pdf">PDF</a>): Provides the capability to deduce the referent types
<li><aclass="reference"href="iterator_concepts.html"><ttclass="literal"><spanclass="pre">iterator_concepts.hpp</span></tt></a> (<aclass="reference"href="iterator_concepts.pdf">PDF</a>): Concept checking classes for the new iterator concepts.</li>
<li><aclass="reference"href="iterator_archetypes.html"><ttclass="literal"><spanclass="pre">iterator_archetypes.hpp</span></tt></a> (<aclass="reference"href="iterator_archetypes.pdf">PDF</a>): Concept archetype classes for the new iterators concepts.</li>
<h1><aclass="toc-backref"href="#id28"name="upgrading-from-the-old-boost-iterator-adaptor-library">Upgrading from the old Boost Iterator Adaptor Library</a></h1>
you can now define the iterator class yourself and acquire
functionality through inheritance from <ttclass="literal"><spanclass="pre">iterator_facade</span></tt> or
<ttclass="literal"><spanclass="pre">iterator_adaptor</span></tt>. As a result, you also get much finer control
over how your iterator works: you can add additional constructors,
or even override the iterator functionality provided by the
library.</p>
<p>If you're looking for the old <ttclass="literal"><spanclass="pre">projection_iterator</span></tt> component,
its functionality has been merged into <ttclass="literal"><spanclass="pre">transform_iterator</span></tt>: as
long as the function object's <ttclass="literal"><spanclass="pre">result_type</span></tt> (or the <ttclass="literal"><spanclass="pre">Reference</span></tt>
template argument, if explicitly specified) is a true reference
type, <ttclass="literal"><spanclass="pre">transform_iterator</span></tt> will behave like
<ttclass="literal"><spanclass="pre">projection_iterator</span></tt> used to.</p>
Generated by <aclass="reference"href="http://docutils.sourceforge.net/">Docutils</a> from <aclass="reference"href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.