mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-23 17:37:15 +02:00
Added PDF references
[SVN r21985]
This commit is contained in:
@ -53,21 +53,21 @@ older Boost Iterator Adaptor Library.</td>
|
||||
<div class="contents topic" id="table-of-contents">
|
||||
<p class="topic-title"><a name="table-of-contents"><strong>Table of Contents</strong></a></p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference" href="#new-style-iterators" id="id6" name="id6">New-Style Iterators</a></li>
|
||||
<li><a class="reference" href="#iterator-facade-and-adaptor" id="id7" name="id7">Iterator Facade and Adaptor</a></li>
|
||||
<li><a class="reference" href="#specialized-adaptors" id="id8" name="id8">Specialized Adaptors</a></li>
|
||||
<li><a class="reference" href="#iterator-utilities" id="id9" name="id9">Iterator Utilities</a><ul>
|
||||
<li><a class="reference" href="#traits" id="id10" name="id10">Traits</a></li>
|
||||
<li><a class="reference" href="#testing-and-concept-checking" id="id11" name="id11">Testing and Concept Checking</a></li>
|
||||
<li><a class="reference" href="#new-style-iterators" id="id22" name="id22">New-Style Iterators</a></li>
|
||||
<li><a class="reference" href="#iterator-facade-and-adaptor" id="id23" name="id23">Iterator Facade and Adaptor</a></li>
|
||||
<li><a class="reference" href="#specialized-adaptors" id="id24" name="id24">Specialized Adaptors</a></li>
|
||||
<li><a class="reference" href="#iterator-utilities" id="id25" name="id25">Iterator Utilities</a><ul>
|
||||
<li><a class="reference" href="#traits" id="id26" name="id26">Traits</a></li>
|
||||
<li><a class="reference" href="#testing-and-concept-checking" id="id27" name="id27">Testing and Concept Checking</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a class="reference" href="#upgrading-from-the-old-boost-iterator-adaptor-library" id="id12" name="id12">Upgrading from the old Boost Iterator Adaptor Library</a></li>
|
||||
<li><a class="reference" href="#history" id="id13" name="id13">History</a></li>
|
||||
<li><a class="reference" href="#upgrading-from-the-old-boost-iterator-adaptor-library" id="id28" name="id28">Upgrading from the old Boost Iterator Adaptor Library</a></li>
|
||||
<li><a class="reference" href="#history" id="id29" name="id29">History</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<hr />
|
||||
<div class="section" id="new-style-iterators">
|
||||
<h1><a class="toc-backref" href="#id6" name="new-style-iterators">New-Style Iterators</a></h1>
|
||||
<h1><a class="toc-backref" href="#id22" name="new-style-iterators">New-Style Iterators</a></h1>
|
||||
<p>The iterator categories defined in C++98 are extremely limiting
|
||||
because they bind together two orthogonal concepts: traversal and
|
||||
element access. For example, because a random access iterator is
|
||||
@ -83,10 +83,10 @@ iterators already in use which can't be adequately represented by
|
||||
the existing concepts. For details about the new iterator
|
||||
concepts, see our</p>
|
||||
<blockquote>
|
||||
<a class="reference" href="new-iter-concepts.html">Standard Proposal For New-Style Iterators</a></blockquote>
|
||||
<a class="reference" href="new-iter-concepts.html">Standard Proposal For New-Style Iterators</a> (<a class="reference" href="new-iter-concepts.pdf">PDF</a>)</blockquote>
|
||||
</div>
|
||||
<div class="section" id="iterator-facade-and-adaptor">
|
||||
<h1><a class="toc-backref" href="#id7" name="iterator-facade-and-adaptor">Iterator Facade and Adaptor</a></h1>
|
||||
<h1><a class="toc-backref" href="#id23" name="iterator-facade-and-adaptor">Iterator Facade and Adaptor</a></h1>
|
||||
<p>Writing standard-conforming iterators is tricky, but the need comes
|
||||
up often. In order to ease the implementation of new iterators,
|
||||
the Boost.Iterator library provides the <tt class="literal"><span class="pre">iterator_facade</span></tt> class template,
|
||||
@ -102,65 +102,65 @@ behavior as possible.</p>
|
||||
<p>The documentation for these two classes can be found at the following
|
||||
web pages:</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference" href="iterator_facade.html"><tt class="literal"><span class="pre">iterator_facade</span></tt></a></li>
|
||||
<li><a class="reference" href="iterator_adaptor.html"><tt class="literal"><span class="pre">iterator_adaptor</span></tt></a></li>
|
||||
<li><a class="reference" href="iterator_facade.html"><tt class="literal"><span class="pre">iterator_facade</span></tt></a> (<a class="reference" href="iterator_facade.pdf">PDF</a>)</li>
|
||||
<li><a class="reference" href="iterator_adaptor.html"><tt class="literal"><span class="pre">iterator_adaptor</span></tt></a> (<a class="reference" href="iterator_adaptor.pdf">PDF</a>)</li>
|
||||
</ul>
|
||||
<p>Both <tt class="literal"><span class="pre">iterator_facade</span></tt> and <tt class="literal"><span class="pre">iterator_adaptor</span></tt> as well as many of the <a class="reference" href="#specialized-adaptors">specialized
|
||||
adaptors</a> mentioned below have been proposed for standardization,
|
||||
and accepted into the first C++ technical report; see our</p>
|
||||
<blockquote>
|
||||
<a class="reference" href="facade-and-adaptor.html">Standard Proposal For Iterator Facade and Adaptor</a></blockquote>
|
||||
<a class="reference" href="facade-and-adaptor.html">Standard Proposal For Iterator Facade and Adaptor</a> (<a class="reference" href="facade-and-adaptor.pdf">PDF</a>)</blockquote>
|
||||
<p>for more details.</p>
|
||||
</div>
|
||||
<div class="section" id="specialized-adaptors">
|
||||
<h1><a class="toc-backref" href="#id8" name="specialized-adaptors">Specialized Adaptors</a></h1>
|
||||
<h1><a class="toc-backref" href="#id24" name="specialized-adaptors">Specialized Adaptors</a></h1>
|
||||
<p>The iterator library supplies a useful suite of standard-conforming
|
||||
iterator templates based on the Boost <a class="reference" href="#iterator-facade-and-adaptor">iterator facade and adaptor</a>.</p>
|
||||
<ul class="simple">
|
||||
<li><a class="reference" href="counting_iterator.html"><tt class="literal"><span class="pre">counting_iterator</span></tt></a>: an iterator over a sequence of consecutive values.
|
||||
<li><a class="reference" href="counting_iterator.html"><tt class="literal"><span class="pre">counting_iterator</span></tt></a> (<a class="reference" href="counting_iterator.pdf">PDF</a>): an iterator over a sequence of consecutive values.
|
||||
Implements a "lazy sequence"</li>
|
||||
<li><a class="reference" href="filter_iterator.html"><tt class="literal"><span class="pre">filter_iterator</span></tt></a>: an iterator over the subset of elements of some
|
||||
<li><a class="reference" href="filter_iterator.html"><tt class="literal"><span class="pre">filter_iterator</span></tt></a> (<a class="reference" href="filter_iterator.pdf">PDF</a>): an iterator over the subset of elements of some
|
||||
sequence which satisfy a given predicate</li>
|
||||
<li><a class="reference" href="indirect_iterator.html"><tt class="literal"><span class="pre">indirect_iterator</span></tt></a>: an iterator over the objects <em>pointed-to</em> by the
|
||||
<li><a class="reference" href="indirect_iterator.html"><tt class="literal"><span class="pre">indirect_iterator</span></tt></a> (<a class="reference" href="indirect_iterator.pdf">PDF</a>): an iterator over the objects <em>pointed-to</em> by the
|
||||
elements of some sequence.</li>
|
||||
<li><a class="reference" href="permutation_iterator.html"><tt class="literal"><span class="pre">permutation_iterator</span></tt></a>: an iterator over the elements of some random-access
|
||||
<li><a class="reference" href="permutation_iterator.html"><tt class="literal"><span class="pre">permutation_iterator</span></tt></a> (<a class="reference" href="permutation_iterator.pdf">PDF</a>): an iterator over the elements of some random-access
|
||||
sequence, rearranged according to some sequence of integer indices.</li>
|
||||
<li><a class="reference" href="reverse_iterator.html"><tt class="literal"><span class="pre">reverse_iterator</span></tt></a>: an iterator which traverses the elements of some
|
||||
<li><a class="reference" href="reverse_iterator.html"><tt class="literal"><span class="pre">reverse_iterator</span></tt></a> (<a class="reference" href="reverse_iterator.pdf">PDF</a>): an iterator which traverses the elements of some
|
||||
bidirectional sequence in reverse. Corrects many of the
|
||||
shortcomings of C++98's <tt class="literal"><span class="pre">std::reverse_iterator</span></tt>.</li>
|
||||
<li><a class="reference" href="transform_iterator.html"><tt class="literal"><span class="pre">transform_iterator</span></tt></a>: an iterator over elements which are the result of
|
||||
<li><a class="reference" href="transform_iterator.html"><tt class="literal"><span class="pre">transform_iterator</span></tt></a> (<a class="reference" href="transform_iterator.pdf">PDF</a>): an iterator over elements which are the result of
|
||||
applying some functional transformation to the elements of an
|
||||
underlying sequence. This component also replaces the old
|
||||
<tt class="literal"><span class="pre">projection_iterator_adaptor</span></tt>.</li>
|
||||
<li><a class="reference" href="zip_iterator.html"><tt class="literal"><span class="pre">zip_iterator</span></tt></a>: an iterator over tuples of the elements at corresponding
|
||||
<li><a class="reference" href="zip_iterator.html"><tt class="literal"><span class="pre">zip_iterator</span></tt></a> (<a class="reference" href="zip_iterator.pdf">PDF</a>): an iterator over tuples of the elements at corresponding
|
||||
positions of heterogeneous underlying iterators.</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="iterator-utilities">
|
||||
<h1><a class="toc-backref" href="#id9" name="iterator-utilities">Iterator Utilities</a></h1>
|
||||
<h1><a class="toc-backref" href="#id25" name="iterator-utilities">Iterator Utilities</a></h1>
|
||||
<div class="section" id="traits">
|
||||
<h2><a class="toc-backref" href="#id10" name="traits">Traits</a></h2>
|
||||
<h2><a class="toc-backref" href="#id26" name="traits">Traits</a></h2>
|
||||
<ul class="simple">
|
||||
<li><a class="reference" href="pointee.html"><tt class="literal"><span class="pre">pointee.hpp</span></tt></a>: Provides the capability to deduce the referent types
|
||||
<li><a class="reference" href="pointee.html"><tt class="literal"><span class="pre">pointee.hpp</span></tt></a> (<a class="reference" href="pointee.pdf">PDF</a>): Provides the capability to deduce the referent types
|
||||
of pointers, smart pointers and iterators in generic code. Used
|
||||
in <tt class="literal"><span class="pre">indirect_iterator</span></tt>.</li>
|
||||
<li><a class="reference" href="iterator_traits.html"><tt class="literal"><span class="pre">iterator_traits.hpp</span></tt></a>: Provides <a class="reference" href="../../mpl/doc/index.html">MPL</a>-compatible metafunctions which
|
||||
<li><a class="reference" href="iterator_traits.html"><tt class="literal"><span class="pre">iterator_traits.hpp</span></tt></a> (<a class="reference" href="iterator_traits.pdf">PDF</a>): Provides <a class="reference" href="../../mpl/doc/index.html">MPL</a>-compatible metafunctions which
|
||||
retrieve an iterator's traits. Also corrects for the deficiencies
|
||||
of broken implementations of <tt class="literal"><span class="pre">std::iterator_traits</span></tt>.</li>
|
||||
<li><a class="reference" href="interoperable.html"><tt class="literal"><span class="pre">interoperable.hpp</span></tt></a>: Provides an <a class="reference" href="../../mpl/doc/index.html">MPL</a>-compatible metafunction for
|
||||
<li><a class="reference" href="interoperable.html"><tt class="literal"><span class="pre">interoperable.hpp</span></tt></a> (<a class="reference" href="interoperable.pdf">PDF</a>): Provides an <a class="reference" href="../../mpl/doc/index.html">MPL</a>-compatible metafunction for
|
||||
testing iterator interoperability</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="section" id="testing-and-concept-checking">
|
||||
<h2><a class="toc-backref" href="#id11" name="testing-and-concept-checking">Testing and Concept Checking</a></h2>
|
||||
<h2><a class="toc-backref" href="#id27" name="testing-and-concept-checking">Testing and Concept Checking</a></h2>
|
||||
<ul class="simple">
|
||||
<li><a class="reference" href="iterator_concepts.html"><tt class="literal"><span class="pre">iterator_concepts.hpp</span></tt></a>: Concept checking classes for the new iterator concepts.</li>
|
||||
<li><a class="reference" href="iterator_archetypes.html"><tt class="literal"><span class="pre">iterator_archetypes.hpp</span></tt></a>: Concept archetype classes for the new iterators concepts.</li>
|
||||
<li><a class="reference" href="iterator_concepts.html"><tt class="literal"><span class="pre">iterator_concepts.hpp</span></tt></a> (<a class="reference" href="iterator_concepts.pdf">PDF</a>): Concept checking classes for the new iterator concepts.</li>
|
||||
<li><a class="reference" href="iterator_archetypes.html"><tt class="literal"><span class="pre">iterator_archetypes.hpp</span></tt></a> (<a class="reference" href="iterator_archetypes.pdf">PDF</a>): Concept archetype classes for the new iterators concepts.</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="section" id="upgrading-from-the-old-boost-iterator-adaptor-library">
|
||||
<h1><a class="toc-backref" href="#id12" name="upgrading-from-the-old-boost-iterator-adaptor-library">Upgrading from the old Boost Iterator Adaptor Library</a></h1>
|
||||
<h1><a class="toc-backref" href="#id28" name="upgrading-from-the-old-boost-iterator-adaptor-library">Upgrading from the old Boost Iterator Adaptor Library</a></h1>
|
||||
<a class="target" id="upgrading" name="upgrading"></a><p>If you have been using the old Boost Iterator Adaptor library to
|
||||
implement iterators, you probably wrote a <tt class="literal"><span class="pre">Policies</span></tt> class which
|
||||
captures the core operations of your iterator. In the new library
|
||||
@ -170,7 +170,7 @@ you probably wrote a <a class="reference" href="../../../more/generic_programmin
|
||||
<tt class="literal"><span class="pre">iterator_adaptor</span></tt> specialization you needed; in the new library
|
||||
design you don't need a type generator (though may want to keep it
|
||||
around as a compatibility aid for older code) because, due to the
|
||||
use of the Curiously Recurring Template Pattern (CRTP) <a class="citation-reference" href="#cop95" id="id5" name="id5">[Cop95]</a>,
|
||||
use of the Curiously Recurring Template Pattern (CRTP) <a class="citation-reference" href="#cop95" id="id21" name="id21">[Cop95]</a>,
|
||||
you can now define the iterator class yourself and acquire
|
||||
functionality through inheritance from <tt class="literal"><span class="pre">iterator_facade</span></tt> or
|
||||
<tt class="literal"><span class="pre">iterator_adaptor</span></tt>. As a result, you also get much finer control
|
||||
@ -185,7 +185,7 @@ type, <tt class="literal"><span class="pre">transform_iterator</span></tt> will
|
||||
<tt class="literal"><span class="pre">projection_iterator</span></tt> used to.</p>
|
||||
</div>
|
||||
<div class="section" id="history">
|
||||
<h1><a class="toc-backref" href="#id13" name="history">History</a></h1>
|
||||
<h1><a class="toc-backref" href="#id29" name="history">History</a></h1>
|
||||
<p>In 2000 Dave Abrahams was writing an iterator for a container of
|
||||
pointers, which would access the pointed-to elements when
|
||||
dereferenced. Naturally, being a library writer, he decided to
|
||||
@ -214,7 +214,7 @@ library you see today.</p>
|
||||
<colgroup><col class="label" /><col /></colgroup>
|
||||
<col />
|
||||
<tbody valign="top">
|
||||
<tr><td class="label"><a class="fn-backref" href="#id5" name="cop95">[Cop95]</a></td><td>[Coplien, 1995] Coplien, J., Curiously Recurring Template
|
||||
<tr><td class="label"><a class="fn-backref" href="#id21" name="cop95">[Cop95]</a></td><td>[Coplien, 1995] Coplien, J., Curiously Recurring Template
|
||||
Patterns, C++ Report, February 1995, pp. 24-27.</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
@ -71,9 +71,10 @@ concepts, see our
|
||||
__ http://www.gotw.ca/gotw/050.htm
|
||||
|
||||
|
||||
`Standard Proposal For New-Style Iterators`__
|
||||
`Standard Proposal For New-Style Iterators`__ (PDF__)
|
||||
|
||||
__ new-iter-concepts.html
|
||||
__ new-iter-concepts.pdf
|
||||
|
||||
=============================
|
||||
Iterator Facade and Adaptor
|
||||
@ -96,25 +97,29 @@ behavior as possible.
|
||||
The documentation for these two classes can be found at the following
|
||||
web pages:
|
||||
|
||||
* |facade|_
|
||||
* |facade|_ (PDF__)
|
||||
|
||||
* |adaptor|_
|
||||
* |adaptor|_ (PDF__)
|
||||
|
||||
|
||||
.. |facade| replace:: ``iterator_facade``
|
||||
.. _facade: iterator_facade.html
|
||||
__ iterator_facade.pdf
|
||||
|
||||
.. |adaptor| replace:: ``iterator_adaptor``
|
||||
.. _adaptor: iterator_adaptor.html
|
||||
__ iterator_adaptor.pdf
|
||||
|
||||
Both |facade| and |adaptor| as well as many of the `specialized
|
||||
adaptors`_ mentioned below have been proposed for standardization,
|
||||
and accepted into the first C++ technical report; see our
|
||||
|
||||
`Standard Proposal For Iterator Facade and Adaptor`__
|
||||
`Standard Proposal For Iterator Facade and Adaptor`__ (PDF__)
|
||||
|
||||
for more details.
|
||||
|
||||
__ facade-and-adaptor.html
|
||||
__ facade-and-adaptor.pdf
|
||||
|
||||
======================
|
||||
Specialized Adaptors
|
||||
@ -123,50 +128,57 @@ __ facade-and-adaptor.html
|
||||
The iterator library supplies a useful suite of standard-conforming
|
||||
iterator templates based on the Boost `iterator facade and adaptor`_.
|
||||
|
||||
* |counting|_: an iterator over a sequence of consecutive values.
|
||||
* |counting|_ (PDF__): an iterator over a sequence of consecutive values.
|
||||
Implements a "lazy sequence"
|
||||
|
||||
* |filter|_: an iterator over the subset of elements of some
|
||||
* |filter|_ (PDF__): an iterator over the subset of elements of some
|
||||
sequence which satisfy a given predicate
|
||||
|
||||
* |indirect|_: an iterator over the objects *pointed-to* by the
|
||||
* |indirect|_ (PDF__): an iterator over the objects *pointed-to* by the
|
||||
elements of some sequence.
|
||||
|
||||
* |permutation|_: an iterator over the elements of some random-access
|
||||
* |permutation|_ (PDF__): an iterator over the elements of some random-access
|
||||
sequence, rearranged according to some sequence of integer indices.
|
||||
|
||||
* |reverse|_: an iterator which traverses the elements of some
|
||||
* |reverse|_ (PDF__): an iterator which traverses the elements of some
|
||||
bidirectional sequence in reverse. Corrects many of the
|
||||
shortcomings of C++98's ``std::reverse_iterator``.
|
||||
|
||||
* |transform|_: an iterator over elements which are the result of
|
||||
* |transform|_ (PDF__): an iterator over elements which are the result of
|
||||
applying some functional transformation to the elements of an
|
||||
underlying sequence. This component also replaces the old
|
||||
``projection_iterator_adaptor``.
|
||||
|
||||
* |zip|_: an iterator over tuples of the elements at corresponding
|
||||
* |zip|_ (PDF__): an iterator over tuples of the elements at corresponding
|
||||
positions of heterogeneous underlying iterators.
|
||||
|
||||
.. |counting| replace:: ``counting_iterator``
|
||||
.. _counting: counting_iterator.html
|
||||
__ counting_iterator.pdf
|
||||
|
||||
.. |filter| replace:: ``filter_iterator``
|
||||
.. _filter: filter_iterator.html
|
||||
__ filter_iterator.pdf
|
||||
|
||||
.. |indirect| replace:: ``indirect_iterator``
|
||||
.. _indirect: indirect_iterator.html
|
||||
__ indirect_iterator.pdf
|
||||
|
||||
.. |permutation| replace:: ``permutation_iterator``
|
||||
.. _permutation: permutation_iterator.html
|
||||
__ permutation_iterator.pdf
|
||||
|
||||
.. |reverse| replace:: ``reverse_iterator``
|
||||
.. _reverse: reverse_iterator.html
|
||||
__ reverse_iterator.pdf
|
||||
|
||||
.. |transform| replace:: ``transform_iterator``
|
||||
.. _transform: transform_iterator.html
|
||||
__ transform_iterator.pdf
|
||||
|
||||
.. |zip| replace:: ``zip_iterator``
|
||||
.. _zip: zip_iterator.html
|
||||
__ zip_iterator.pdf
|
||||
|
||||
====================
|
||||
Iterator Utilities
|
||||
@ -175,41 +187,45 @@ iterator templates based on the Boost `iterator facade and adaptor`_.
|
||||
Traits
|
||||
------
|
||||
|
||||
* |pointee|_: Provides the capability to deduce the referent types
|
||||
* |pointee|_ (PDF__): Provides the capability to deduce the referent types
|
||||
of pointers, smart pointers and iterators in generic code. Used
|
||||
in |indirect|.
|
||||
|
||||
* |iterator_traits|_: Provides MPL_\ -compatible metafunctions which
|
||||
* |iterator_traits|_ (PDF__): Provides MPL_\ -compatible metafunctions which
|
||||
retrieve an iterator's traits. Also corrects for the deficiencies
|
||||
of broken implementations of ``std::iterator_traits``.
|
||||
|
||||
* |interoperable|_: Provides an MPL_\ -compatible metafunction for
|
||||
* |interoperable|_ (PDF__): Provides an MPL_\ -compatible metafunction for
|
||||
testing iterator interoperability
|
||||
|
||||
.. |pointee| replace:: ``pointee.hpp``
|
||||
.. _pointee: pointee.html
|
||||
__ pointee.pdf
|
||||
|
||||
.. |iterator_traits| replace:: ``iterator_traits.hpp``
|
||||
.. _iterator_traits: iterator_traits.html
|
||||
__ iterator_traits.pdf
|
||||
|
||||
.. |interoperable| replace:: ``interoperable.hpp``
|
||||
.. _interoperable: interoperable.html
|
||||
__ interoperable.pdf
|
||||
|
||||
.. _MPL: ../../mpl/doc/index.html
|
||||
|
||||
Testing and Concept Checking
|
||||
----------------------------
|
||||
|
||||
* |iterator_concepts|_: Concept checking classes for the new iterator concepts.
|
||||
* |iterator_concepts|_ (PDF__): Concept checking classes for the new iterator concepts.
|
||||
|
||||
* |iterator_archetypes|_: Concept archetype classes for the new iterators concepts.
|
||||
* |iterator_archetypes|_ (PDF__): Concept archetype classes for the new iterators concepts.
|
||||
|
||||
.. |iterator_concepts| replace:: ``iterator_concepts.hpp``
|
||||
.. _iterator_concepts: iterator_concepts.html
|
||||
__ iterator_concepts.pdf
|
||||
|
||||
.. |iterator_archetypes| replace:: ``iterator_archetypes.hpp``
|
||||
.. _iterator_archetypes: iterator_archetypes.html
|
||||
|
||||
__ iterator_archetypes.pdf
|
||||
|
||||
=======================================================
|
||||
Upgrading from the old Boost Iterator Adaptor Library
|
||||
|
Reference in New Issue
Block a user