mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-20 08:02:10 +02:00
some changes from Dave
[SVN r21658]
This commit is contained in:
@ -16,7 +16,7 @@
|
||||
|
||||
:abstract:
|
||||
|
||||
.. include:: filter_iterator_abstract.rst
|
||||
.. include:: filter_iterator_abstract.rst
|
||||
|
||||
.. contents:: Table of Contents
|
||||
|
||||
|
@ -1,10 +1,11 @@
|
||||
The filter iterator adaptor creates a view of an iterator range in
|
||||
which some elements of the range are skipped over. A predicate
|
||||
function object controls which elements are skipped. When the
|
||||
predicate is applied to an element, if it returns ``true`` then the
|
||||
element is retained and if it returns ``false`` then the element is
|
||||
skipped over. When skipping over elements, it is necessary for the
|
||||
filter adaptor to know when to stop so as to avoid going past the end
|
||||
of the underlying range. Therefore the constructor of the filter
|
||||
iterator takes two iterator parameters: the position for the filtered
|
||||
iterator and the end of the range.
|
||||
which some elements of the range are skipped. A predicate function
|
||||
object controls which elements are skipped. When the predicate is
|
||||
applied to an element, if it returns ``true`` then the element is
|
||||
retained and if it returns ``false`` then the element is skipped
|
||||
over. When skipping over elements, it is necessary for the filter
|
||||
adaptor to know when to stop so as to avoid going past the end of the
|
||||
underlying range. A filter iterator is therefore constructed with pair
|
||||
of iterators indicating the range of elements in the unfiltered
|
||||
sequence to be traversed.
|
||||
|
||||
|
@ -54,7 +54,7 @@ Input Iterator.
|
||||
``filter_iterator`` models
|
||||
..........................
|
||||
|
||||
The concepts that ``filter_iterator`` models are dependent on what
|
||||
The concepts that ``filter_iterator`` models are dependent on which
|
||||
concepts the ``Iterator`` argument models, as specified in the
|
||||
following tables.
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
:abstract:
|
||||
|
||||
.. include:: function_output_iterator_abstract.rst
|
||||
.. include:: function_output_iterator_abstract.rst
|
||||
|
||||
.. contents:: Table of Contents
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
:abstract:
|
||||
|
||||
.. include:: indirect_iterator_abstract.rst
|
||||
.. include:: indirect_iterator_abstract.rst
|
||||
|
||||
.. contents:: Table of Contents
|
||||
|
||||
|
@ -5,17 +5,19 @@
|
||||
filter_iterator<Predicate,Iterator>
|
||||
make_filter_iterator(Predicate f, Iterator x, Iterator end = Iterator());
|
||||
|
||||
:Returns: An instance of ``filter_iterator<Predicate,Iterator>`` at
|
||||
the first position in the range ``[x,end)`` such that
|
||||
``f(*this->base()) == true`` or else at position ``end``.
|
||||
|
||||
:Returns: An instance of ``filter_iterator<Predicate,Iterator>``
|
||||
where ``m_iter`` is either the first position in the range ``[x,end)`` such that
|
||||
``f(*this->base()) == true`` or else ``m_iter == end``.
|
||||
The member ``m_pred`` is constructed from ``f`` and ``m_end`` from ``end``.
|
||||
::
|
||||
|
||||
template <class Predicate, class Iterator>
|
||||
filter_iterator<Predicate,Iterator>
|
||||
make_filter_iterator(Iterator x, Iterator end = Iterator());
|
||||
|
||||
:Returns: An instance of ``filter_iterator<Predicate,Iterator>`` at
|
||||
the first position in the range ``[x,end)``
|
||||
:Returns: An instance of ``filter_iterator<Predicate,Iterator>``
|
||||
where ``m_iter`` is either the first position in the range ``[x,end)``
|
||||
such that ``f(*this->base()) == true``, where ``f`` is a default
|
||||
constructed ``Predicate``, or else at position ``end``.
|
||||
constructed ``Predicate``, or else ``m_iter == end``.
|
||||
The member ``m_pred`` is default constructed and ``m_end``
|
||||
is constructed from ``end``.
|
@ -14,7 +14,7 @@
|
||||
|
||||
:abstract:
|
||||
|
||||
.. include:: permutation_iterator_abstract.rst
|
||||
.. include:: permutation_iterator_abstract.rst
|
||||
|
||||
.. contents:: Table of Contents
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
:abstract:
|
||||
|
||||
.. include:: reverse_iterator_abstract.rst
|
||||
.. include:: reverse_iterator_abstract.rst
|
||||
|
||||
.. contents:: Table of Contents
|
||||
|
||||
|
@ -42,27 +42,10 @@ Iterator and Readable Iterator.
|
||||
``reverse_iterator`` models
|
||||
...........................
|
||||
|
||||
The concepts that ``reverse_iterator`` models are dependent on what
|
||||
concepts the ``Iterator`` argument models, as specified in the
|
||||
following tables.
|
||||
|
||||
+----------------------------------+-------------------------------------+
|
||||
| If ``Iterator`` models | then ``reverse_iterator`` models |
|
||||
+==================================+=====================================+
|
||||
| Bidirectional Traversal Iterator | Bidirectional Traversal Iterator |
|
||||
+----------------------------------+-------------------------------------+
|
||||
| Random Access Traversal Iterator | Random Access Traversal Iterator |
|
||||
+----------------------------------+-------------------------------------+
|
||||
|
||||
+--------------------------------+----------------------------------------------+
|
||||
| If ``Iterator`` models | then ``reverse_iterator`` models |
|
||||
+================================+==============================================+
|
||||
| Readable Iterator | Readable Iterator |
|
||||
+--------------------------------+----------------------------------------------+
|
||||
| Writable Iterator | Writable Iterator |
|
||||
+--------------------------------+----------------------------------------------+
|
||||
| Lvalue Iterator | Lvalue Iterator |
|
||||
+--------------------------------+----------------------------------------------+
|
||||
``reverse_iterator`` models the same standard traversal and access
|
||||
iterator concepts that the ``Iterator`` argument models. In addition,
|
||||
``reverse_iterator`` models the old iterator concepts specified in the
|
||||
following table, depnding on what the ``Iterator`` argument models.
|
||||
|
||||
|
||||
+-------------------------------------------------------+----------------------------------+
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
:abstract:
|
||||
|
||||
.. include:: transform_iterator_abstract.rst
|
||||
.. include:: transform_iterator_abstract.rst
|
||||
|
||||
.. contents:: Table of Contents
|
||||
|
||||
|
Reference in New Issue
Block a user