diff --git a/doc/facade-and-adaptor.html b/doc/facade-and-adaptor.html index dab0bfc..c9a07a2 100755 --- a/doc/facade-and-adaptor.html +++ b/doc/facade-and-adaptor.html @@ -3,7 +3,7 @@
- +-+
@@ -724,7 +725,7 @@ is a constant object of a random access traversal iterator type interoperable with X. iterator_facade Core Operations
-+
@@ -1011,13 +1012,13 @@ rights reserved. --> template < class Derived , class Base - , class Value = use_default - , class CategoryOrTraversal = use_default - , class Reference = use_default + , class Value = use_default + , class CategoryOrTraversal = use_default + , class Reference = use_default , class Difference = use_default > class iterator_adaptor - : public iterator_facade<Derived, V, C, R, D> // see details + : public iterator_facade<Derived, V, C, R, D> // see details { friend class iterator_core_access; public: @@ -1049,9 +1050,15 @@ class iterator_adaptor Base m_iterator; // exposition only }; + + +iterator_adaptor requirements
+The Derived template argument must be a publicly derived from +iterator_adaptor.
+The Base argument shall be Assignable and Copy Constructible.
--iterator_adaptor base class parameters
+iterator_adaptor base class parameters
The V, C, R, and D parameters of the iterator_facade used as a base class in the summary of iterator_adaptor above are defined as follows:
@@ -1080,20 +1087,18 @@ above are defined as follows: return Difference-iterator_adaptor usage
-The Derived template parameter must be a publicly derived from -iterator_adaptor. In order for Derived to model the -iterator concepts corresponding to -iterator_traits<Derived>::iterator_category, the expressions -involving m_iterator in the specifications of those private -member functions of iterator_adaptor that may be called by -iterator_facade<Derived, V, C, R, D> -in evaluating any valid expression involving Derived -in those concepts' requirements.
++iterator_adaptor models
+In order for Derived to model the iterator concepts corresponding +to iterator_traits<Derived>::iterator_category, the expressions +involving m_iterator in the specifications of those private member +functions of iterator_adaptor that may be called by +iterator_facade<Derived, V, C, R, D> in evaluating any valid +expression involving Derived in those concepts' requirements.
+-iterator_adaptor public operations
+iterator_adaptor public operations
iterator_adaptor();
@@ -1127,7 +1132,7 @@ in those concepts' requirements. -iterator_adaptor protected member functions
+iterator_adaptor protected member functions
Base const& base_reference() const;
@@ -1148,7 +1153,7 @@ in those concepts' requirements. -iterator_adaptor private member functions
+iterator_adaptor private member functions
typename iterator_adaptor::reference dereference() const;
@@ -1217,7 +1222,7 @@ typename iterator_adaptor::difference_type distance_to( -Specialized adaptors [lib.iterator.special.adaptors]
+Specialized adaptors [lib.iterator.special.adaptors]
The enable_if_convertible<X,Y>::type expression used in this section is for exposition purposes. The converting constructors for specialized adaptors should be only be in an overload set provided @@ -1246,7 +1251,7 @@ take the constructor out of the overload set when the types are not implicitly convertible. ]
-Indirect iterator
+Indirect iterator
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 @@ -1255,7 +1260,7 @@ adaptor makes it possible to view a container of pointers
-Class template indirect_iterator
+Class template indirect_iterator
template < class Iterator @@ -1327,7 +1332,7 @@ satisfies the requirements of the concepts modeled by the indirect iterator as specified in the models section.-indirect_iterator requirements
+indirect_iterator requirements
The Iterator argument shall meet the requirements of Readable Iterator. The CategoryOrTraversal argument shall be one of the standard iterator tags or use_default. If CategoryOrTraversal @@ -1343,7 +1348,7 @@ is not use_default, as implied default for the value_type member.
-indirect_iterator models
+indirect_iterator models
If CategoryOrTraversal is a standard iterator tag, indirect_iterator is a model of the iterator concept corresponding to the tag, otherwise indirect_iterator satisfies the requirements @@ -1357,7 +1362,7 @@ the Iterator argument.
indirect_iterator models Lvalue Iterator.-indirect_iterator operations
+indirect_iterator operations
In addition to the operations required by the concepts modeled by indirect_iterator, indirect_iterator provides the following operations.
@@ -1449,13 +1454,11 @@ indirect_iterator(-Reverse iterator
- -The reverse iterator adaptor flips the direction of a base iterator's -motion. Invoking operator++() moves the base iterator backward and -invoking operator--() moves the base iterator forward.
+Reverse iterator
+The reverse iterator adaptor iterates through the adapted iterator +range in the opposite direction.
-Class template reverse_iterator
+Class template reverse_iterator
template <class Iterator> class reverse_iterator @@ -1479,19 +1482,88 @@ private:-reverse_iterator requirements
+reverse_iterator requirements
The base Iterator must be a model of Bidirectional Traversal Iterator and Readable Iterator.
-reverse_iterator models
-reverse_iterator models Bidirectional Traversal Iterator and -Readable Iterator. In addition, reverse_iterator models the same -standard iterator access concepts that the Iterator -argument models.
+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 ++
+ + ++ + + + + If Iterator models +then reverse_iterator models ++ Readable Lvalue Iterator, +Bidirectional Traversal Iterator +Bidirectional Iterator ++ Writable Lvalue Iterator, +Bidirectional Traversal Iterator +Mutable Bidirectional Iterator ++ Readable Lvalue Iterator, +Random Access Traversal Iterator +Random Access Iterator ++ + Writable Lvalue Iterator, +Random Access Traversal Iterator +Mutable Random Access Iterator +-reverse_iterator operations
+reverse_iterator operations
In addition to the operations required by the concepts modeled by reverse_iterator, reverse_iterator provides the following operations.
@@ -1554,7 +1626,7 @@ reverse_iterator(Iterator tmp = m_iterator; -return *..tmp; +return *--tmp;reverse_iterator& operator++();
@@ -1581,14 +1653,12 @@ return *..tmp;
-Transform iterator
-The transform iterator adapts an iterator by applying some function -object to the result of dereferencing the iterator. In other words, -the operator* of the transform iterator first dereferences the -base iterator, passes the result of this to the function object, and -then returns the result.
+Transform iterator
+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.
-Class template transform_iterator
+Class template transform_iterator
template <class UnaryFunction, @@ -1604,8 +1674,8 @@ public: template<class F2, class I2, class R2, class V2> transform_iterator( transform_iterator<F2, I2, R2, V2> const& t - , typename enable_if_convertible<I2, Iterator>::type* = 0 // exposition - , typename enable_if_convertible<F2, UnaryFunction>::type* = 0 // exposition + , typename enable_if_convertible<I2, Iterator>::type* = 0 // exposition only + , typename enable_if_convertible<F2, UnaryFunction>::type* = 0 // exposition only ); Iterator base() const; UnaryFunction functor() const; @@ -1613,13 +1683,13 @@ public: transform_iterator& operator++(); transform_iterator& operator--(); private: - Iterator m_iterator; // exposition - UnaryFunction m_f; // exposition + Iterator m_iterator; // exposition only + UnaryFunction m_f; // exposition only };-transform_iterator requirements
+transform_iterator requirements
The type UnaryFunction must be Assignable, Copy Constructible, and the expression f(*i) must be valid where f is an object of type UnaryFunction, i is an object of type Iterator, and @@ -1628,7 +1698,7 @@ where the type of f(*i) must b
The type Iterator must at least model Readable Iterator.
-transform_iterator models
+transform_iterator models
The resulting transform_iterator models the most refined of the following options that is also modeled by Iterator.
@@ -1646,7 +1716,7 @@ concept that is modeled by Iterator The value_type is remove_cv<remove_reference<reference> >::type.-transform_iterator operations
+transform_iterator operations
In addition to the operations required by the concepts modeled by transform_iterator, transform_iterator provides the following operations.
@@ -1739,7 +1809,7 @@ transform_iterator(-Filter 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 @@ -1751,7 +1821,7 @@ 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.
-Class template filter_iterator
+Class template filter_iterator
template <class Predicate, class Iterator> class filter_iterator @@ -1787,7 +1857,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 @@ -1798,11 +1868,11 @@ Iterator and Single Pass Iterator or it shall meet the requirements of Input Iterator.
-filter_iterator models
+filter_iterator models
The concepts that filter_iterator models are dependent on what concepts the Iterator argument models, as specified in the following tables.
-+
-
@@ -1821,7 +1891,7 @@ following tables. +
-
@@ -1843,7 +1913,7 @@ following tables. +
@@ -1867,7 +1937,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.
@@ -1977,11 +2047,11 @@ or m_pred(*m_iter) -Counting iterator
+Counting iterator
counting_iterator adapts an arithmetic type, such as int, by adding an operator* that returns the current value of the object.
-Class template counting_iterator
+Class template counting_iterator
template < class Incrementable @@ -2009,13 +2079,13 @@ the cases when the Incrementable
-counting_iterator requirements
+counting_iterator requirements
The Incrementable type must be Default Constructible, Copy Constructible, and Assignable. The default distance is an implementation defined signed integral type.
-counting_iterator models
+counting_iterator models
counting_iterator models Readable Lvalue Iterator.
Furthermore, if you wish to create a counting iterator that is a Forward Traversal Iterator, then the following expressions must be valid:
@@ -2040,7 +2110,7 @@ i < j-counting_iterator operations
+counting_iterator operations
In addition to the operations required by the concepts modeled by counting_iterator, counting_iterator provides the following operations.
@@ -2115,7 +2185,7 @@ constructed from x.-Function output iterator
+Function output iterator
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 @@ -2124,7 +2194,7 @@ iterator is that creating a conforming output iterator is non-trivial, particularly because the proper implementation usually requires a proxy object.
-Class template function_output_iterator
+Class template function_output_iterator
template <class UnaryFunction> class function_output_iterator { @@ -2151,7 +2221,7 @@ public:-function_output_iterator requirements
+function_output_iterator requirements
The UnaryFunction must be Assignable, Copy Constructible, and the expression f(x) must be valid, where f is an object of type UnaryFunction and x is an object of a type accepted by f. @@ -2159,7 +2229,7 @@ The resulting function_output_iterator
-function_output_iterator operations
+function_output_iterator operations
explicit function_output_iterator(const UnaryFunction& f = UnaryFunction());
@@ -2200,7 +2270,7 @@ a copy of the unary function f -function_output_iterator::output_proxy operations
+function_output_iterator::output_proxy operations
output_proxy(UnaryFunction& f);
@@ -2235,10 +2305,10 @@ LocalWords: OtherIncrementable Coplien --> -
+
diff --git a/doc/iter-issue-list.rst b/doc/iter-issue-list.rst index c20d065..17666cf 100644 --- a/doc/iter-issue-list.rst +++ b/doc/iter-issue-list.rst @@ -243,9 +243,10 @@ specification. Transform iterator has a two-part specification: it does this, in other words, it does that. "In other words" always means "I didn't say it right, so I'll try again." We need to say it once. -:Proposed resolution: **Needs work** (Jeremy) - -Reword. +:Proposed resolution: + Changed the introduction to: 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. 9.12 Transform_iterator shouldn't mandate private member ======================================================== diff --git a/doc/new-iter-concepts.html b/doc/new-iter-concepts.html index 8bc5c0d..8e5c5a8 100755 --- a/doc/new-iter-concepts.html +++ b/doc/new-iter-concepts.html @@ -7,7 +7,7 @@New Iterator Concepts - + @@ -27,7 +27,7 @@ Systems Lab, University of Hanover Institute for Transport Railway Operation and Construction+ Date: -2003-12-02 2004-01-12 Number: This is a revised version of n1550=03-0133, which was accepted for Technical Report 1 by the C++ standard committee's library working group. This proposal is a @@ -889,7 +889,7 @@ LocalWords: TraversalTag typename lvalues DWA Hmm JGS mis enum -->