diff --git a/doc/counting_iterator.html b/doc/counting_iterator.html index d9d2f94..56ed3e8 100644 --- a/doc/counting_iterator.html +++ b/doc/counting_iterator.html @@ -89,9 +89,9 @@ class counting_iterator Incrementable m_inc; // exposition }; -
If the Diference argument is use_default then the +
If the Difference argument is use_default then the difference_type member is an implementation defined signed -integral type.
+integral type. Otherwise difference_type is Difference.If CategoryOrTraversal is not use_default then the member iterator_category is CategoryOrTraversal. Otherwise, if Incrementable is a numeric type then iterator_category is a @@ -101,7 +101,7 @@ type then iterator_category is iterator_traversal<Incrementable>::type.
diff --git a/doc/facade-and-adaptor.html b/doc/facade-and-adaptor.html index 90e9456..3ec8941 100755 --- a/doc/facade-and-adaptor.html +++ b/doc/facade-and-adaptor.html @@ -3,7 +3,7 @@
- +
@@ -326,7 +326,7 @@ of the derived iterator type. These member functions are described briefly below and in more detail in the iterator facade requirements.
-+
@@ -725,7 +725,7 @@ is a constant object of a random access traversal iterator type interoperable with X. iterator_facade Core Operations
-+
-
@@ -1497,51 +1497,11 @@ 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.
+
@@ -1734,7 +1694,7 @@ concept that is modeled by the IteratorIf transform_iterator is a model of Readable Lvalue Iterator then it models the following original iterator concepts depending on what the Iterator argument models. - +
-
@@ -1858,15 +1818,15 @@ transform_iterator( Filter iterator
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.Class template filter_iterator
@@ -1916,10 +1876,10 @@ 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.
-+
--
@@ -1938,7 +1898,7 @@ following tables. +
@@ -2338,10 +2303,10 @@ LocalWords: OtherIncrementable Coplien --> --
@@ -1960,7 +1920,7 @@ following tables. +
@@ -2198,8 +2164,7 @@ operations.@@ -2189,7 +2155,7 @@ operations.
@@ -2095,9 +2055,9 @@ or m_pred(*m_iter) Counting iterator
-counting_iterator adapts an incrementable type such as int -or std::list<std::string>::iterator, by adding an operator* -that returns the current value of the object.
+counting_iterator adapts an object by adding an operator* that +returns the current value of the object. All other iterator operations +are forwarded to the adapted object.
@@ -2142,27 +2106,22 @@ the cases when the Incrementablecounting_iterator requirementsClass template counting_iterator
@@ -2126,15 +2086,19 @@ class counting_iterator Incrementable m_inc; // exposition };-If the Diference argument is use_default then the +
If the Difference argument is use_default then the difference_type member is an implementation defined signed -integral type.
-The member iterator_category is a type that satisfies the -requirements of the concepts modeled by the counting_iterator as -specified in the models section.
+integral type. Otherwise difference_type is Difference. +If CategoryOrTraversal is not use_default then the member +iterator_category is CategoryOrTraversal. Otherwise, if +Incrementable is a numeric type then iterator_category is a +type convertible to random_access_traversal_tag and +random_access_iterator_tag. If Incrementable is not a numeric +type then iterator_category is +iterator_traversal<Incrementable>::type.
- [Note: implementers are encouraged to provide an implementation of
-- distance_to and a difference_type that avoids overflows in +
- operator- and a difference_type that avoids overflows in the cases when the Incrementable type is a numeric type.]
The Incrementable type must be Default Constructible, Copy Constructible, and Assignable.
- --+counting_iterator models
-counting_iterator models Readable Lvalue Iterator.
-Furthermore, if you wish to create a counting iterator that is a -Forward Traversal Iterator and also Forward Iterator, then the -following expressions must be valid:
+If iterator_category is convertible to forward_iterator_tag or +forward_traversal_tag then the following expressions must be valid:
Incrementable i, j; ++i // pre-increment i == j // operator equal-If you wish to create a counting iterator that is a Bidirectional -Traversal Iterator and also Bidirectional Iterator, then pre-decrement -is also required:
+If iterator_category is convertible to +bidirectional_iterator_tag or bidirectional_traversal_tag then +pre-decrement is required:
--i-If you wish to create a counting iterator that is a Random Access -Traversal Iterator and also Random Access Iterator, then these -additional expressions are also required:
+If iterator_category is convertible to +random_access_iterator_tag or random_access_traversal_tag then +these additional expressions are also required:
counting_iterator::difference_type n; i += n @@ -2170,6 +2129,13 @@ n = i - j i < j+counting_iterator models
+counting_iterator models Readable Lvalue Iterator. In addition, +counting_iterator models the concepts corresponding to the +iterator tags that counting_iterator::iterator_category is +convertible to.
+counting_iterator operations
In addition to the operations required by the concepts modeled by @@ -2180,7 +2146,7 @@ operations.
- Returns: A default constructed instance of counting_iterator. +Effects: Default construct the member m_inc. - Returns: An instance of counting_iterator that is a copy of rhs. +Effects: Construct member m_inc from rhs.m_inc. - Returns: An instance of counting_iterator with m_inc -constructed from x. +Effects: Construct member m_inc from x.
+
diff --git a/doc/filter_iterator.html b/doc/filter_iterator.html index 79f2ac4..62addf6 100644 --- a/doc/filter_iterator.html +++ b/doc/filter_iterator.html @@ -3,11 +3,11 @@ - +Filter Iterator - + @@ -27,7 +27,7 @@ Lab, University of Hanover Institute for Transport Railway Operation and Construction+ Date: -2004-01-12 2004-01-13 @@ -36,32 +36,31 @@ Railway Operation and Construction Copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved - abstract: + abstract: The filter iterator adaptor creates a view of an iterator range in +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. 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.
-filter_iterator synopsis
+filter_iterator synopsis
template <class Predicate, class Iterator> class filter_iterator @@ -97,7 +96,7 @@ corresponding to each standard concept modeled by
-filter_iterator requirements
+filter_iterator requirements
The Predicate argument must be Assignable, Copy Constructible, and the expression p(x) must be valid where p is an object of type Predicate, x is an object of type @@ -108,11 +107,11 @@ Iterator and Single Pass Iterator or it shall meet the requirements of Input Iterator.
-filter_iterator models
-The concepts that filter_iterator models are dependent on what +
filter_iterator models
+The concepts that filter_iterator models are dependent on which concepts the Iterator argument models, as specified in the following tables.
-+
--
@@ -131,7 +130,7 @@ following tables. +
-
@@ -153,7 +152,7 @@ following tables. +
@@ -308,16 +308,18 @@ make_filter_iterator(Iterator x, Iterator end = Iterator());
@@ -177,7 +176,7 @@ following tables. -filter_iterator operations
+filter_iterator operations
In addition to those operations required by the concepts that filter_iterator models, filter_iterator provides the following operations.
@@ -293,9 +292,10 @@ 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. - 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.--Example
+Example
This example uses filter_iterator and then make_filter_iterator to output only the positive integers from an array of integers. Then make_filter_iterator is is used to output @@ -376,12 +378,13 @@ int main() 4 5 8 0 -1 4 5 8 +
The source code for this example can be found here.
+
diff --git a/doc/function_output_iterator.html b/doc/function_output_iterator.html index 1ce6beb..2f05985 100644 --- a/doc/function_output_iterator.html +++ b/doc/function_output_iterator.html @@ -7,7 +7,7 @@Function Output Iterator - + @@ -27,7 +27,7 @@ Lab, University of Hanover Institute for Transport Railway Operation and Construction+ Date: -2004-01-12 2004-01-13 @@ -36,17 +36,16 @@ Railway Operation and Construction Copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved - - - abstract: - The function output iterator adaptor makes it easier to create custom +
+ + abstract: The function output iterator adaptor makes it easier to create custom output iterators. The adaptor takes a unary function and creates a model of Output Iterator. Each item assigned to the output iterator is passed as an argument to the unary function. The motivation for this iterator is that creating a conforming output iterator is non-trivial, particularly because the proper implementation usually requires a -proxy object. +proxy object. +@@ -166,7 +165,7 @@ int main(int, char*[])
diff --git a/doc/indirect_iterator.html b/doc/indirect_iterator.html index fb57d17..cc3b052 100644 --- a/doc/indirect_iterator.html +++ b/doc/indirect_iterator.html @@ -7,7 +7,7 @@Indirect Iterator - + @@ -27,7 +27,7 @@ Lab, University of Hanover Institute for Transport Railway Operation and Construction+ Date: -2004-01-12 2004-01-13 @@ -36,17 +36,17 @@ Railway Operation and Construction Copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved - - - abstract: - The indirect iterator adapts an iterator by applying an extra +
+ + abstract: + The indirect iterator adapts an iterator by applying an extra dereference inside of operator*(). For example, this iterator adaptor makes it possible to view a container of pointers (e.g. list<foo*>) as if it were a container of the pointed-to type (e.g. list<foo>) .
+@@ -315,7 +315,7 @@ a,b,c,d,e,f,g,
diff --git a/doc/make_filter_iterator.rst b/doc/make_filter_iterator.rst index 8ae5e08..ba0c078 100755 --- a/doc/make_filter_iterator.rst +++ b/doc/make_filter_iterator.rst @@ -9,6 +9,7 @@ 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@@ -20,4 +21,4 @@ such that ``f(*this->base()) == true``, where ``f`` is a default constructed ``Predicate``, or else ``m_iter == end``. The member ``m_pred`` is default constructed and ``m_end`` - is constructed from ``end``. \ No newline at end of file + is constructed from ``end``. diff --git a/doc/permutation_iterator.html b/doc/permutation_iterator.html index 7ecaa8a..751ce9c 100644 --- a/doc/permutation_iterator.html +++ b/doc/permutation_iterator.html @@ -7,7 +7,7 @@ Permutation Iterator - + @@ -26,7 +26,7 @@Boost Consulting, Indiana University Open Systems Lab + Date: -2004-01-12 2004-01-13 @@ -35,13 +35,12 @@ Lab Copyright: Copyright Toon Knapen, David Abrahams, Roland Richter, and Jeremy Siek 2003. All rights reserved - abstract: + abstract: The permutation iterator adaptor provides a permuted view of a given +range. That is, the view includes every element of the given range but +in a potentially different order. The permutation iterator adaptor provides a permuted view of a given -range. That is, the view includes every element of the given range but -in a potentially different order.
@@ -215,7 +214,7 @@ Iterate backward with stride 2 : 6 8
diff --git a/doc/reverse_iterator.html b/doc/reverse_iterator.html index 1c2ea23..53f4089 100644 --- a/doc/reverse_iterator.html +++ b/doc/reverse_iterator.html @@ -7,7 +7,7 @@Reverse Iterator - + @@ -27,7 +27,7 @@ Lab, University of Hanover Institute for Transport Railway Operation and Construction+ Date: -2004-01-12 2004-01-13 @@ -36,12 +36,11 @@ Railway Operation and Construction Copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved - abstract: + abstract: The reverse iterator adaptor iterates through the adapted iterator +range in the opposite direction. The reverse iterator adaptor iterates through the adapted iterator -range in the opposite direction.
@@ -92,50 +91,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.
-
@@ -307,7 +266,7 @@ sequence in double-reversed (normal) order: hello world!
diff --git a/doc/transform_iterator.html b/doc/transform_iterator.html index 10eb49c..5ce077c 100644 --- a/doc/transform_iterator.html +++ b/doc/transform_iterator.html @@ -7,7 +7,7 @@Transform Iterator - + @@ -27,7 +27,7 @@ Lab, University of Hanover Institute for Transport Railway Operation and Construction+ Date: -2004-01-12 2004-01-13 @@ -36,13 +36,12 @@ Railway Operation and Construction Copyright: Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved - abstract: + abstract: The transform iterator adapts an iterator by modifying the +operator* to apply a function object to the result of +dereferencing the iterator and returning the result. The transform iterator adapts an iterator by modifying the -operator* to apply a function object to the result of -dereferencing the iterator and returning the result.
@@ -309,7 +308,7 @@ adding 4 to each element in the array: