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