diff --git a/doc/counting_iterator.html b/doc/counting_iterator.html index 731a220..75add53 100644 --- a/doc/counting_iterator.html +++ b/doc/counting_iterator.html @@ -63,6 +63,12 @@ template < class counting_iterator { public: + typedef Incrementable value_type; + typedef const Incrementable& reference; + typedef const Incrementable* pointer; + typedef /* see below */ difference_type; + typedef /* see below */ iterator_category; + counting_iterator(); counting_iterator(counting_iterator const& rhs); explicit counting_iterator(Incrementable x); @@ -74,6 +80,12 @@ class counting_iterator Incrementable m_inc; // exposition }; +

If the Diference 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.

[Note: implementers are encouraged to provide an implementation of
distance_to and a difference_type that avoids overflows in @@ -83,27 +95,28 @@ the cases when the Incrementable

counting_iterator requirements

The Incrementable type must be Default Constructible, Copy -Constructible, and Assignable. The default distance is -an implementation defined signed integral type.

+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, then the following expressions must be valid:

+

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:

 Incrementable i, j;
 ++i         // pre-increment
 i == j      // operator equal
 
-

If you wish to create a counting iterator that is a -Bidirectional Traversal Iterator, then pre-decrement is also required:

+

If you wish to create a counting iterator that is a Bidirectional +Traversal Iterator and also Bidirectional Iterator, then pre-decrement +is also required:

 --i
 

If you wish to create a counting iterator that is a Random Access -Traversal Iterator, then these additional expressions are also -required:

+Traversal Iterator and also Random Access Iterator, then these +additional expressions are also required:

 counting_iterator::difference_type n;
 i += n
@@ -235,7 +248,7 @@ indirectly printing out the numbers from 0 to 7
 
 
 
diff --git a/doc/counting_iterator_ref.rst b/doc/counting_iterator_ref.rst
index a5fdc05..b78cc3b 100644
--- a/doc/counting_iterator_ref.rst
+++ b/doc/counting_iterator_ref.rst
@@ -8,6 +8,12 @@
   class counting_iterator
   {
    public:
+      typedef Incrementable value_type;
+      typedef const Incrementable& reference;
+      typedef const Incrementable* pointer;
+      typedef /* see below */ difference_type;
+      typedef /* see below */ iterator_category;
+
       counting_iterator();
       counting_iterator(counting_iterator const& rhs);
       explicit counting_iterator(Incrementable x);
@@ -20,6 +26,15 @@
     };
 
 
+If the ``Diference`` 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.
+
+
 [*Note:* implementers are encouraged to provide an implementation of
   ``distance_to`` and a ``difference_type`` that avoids overflows in
   the cases when the ``Incrementable`` type is a numeric type.]
@@ -28,8 +43,7 @@
 ..................................
 
 The ``Incrementable`` type must be Default Constructible, Copy
-Constructible, and Assignable.  The default distance is
-an implementation defined signed integral type.
+Constructible, and Assignable. 
 
 
 ``counting_iterator`` models
@@ -37,21 +51,23 @@ an implementation defined signed integral type.
 
 ``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::
+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::
 
     Incrementable i, j;
     ++i         // pre-increment
     i == j      // operator equal
 
-If you wish to create a counting iterator that is a 
-Bidirectional Traversal Iterator, then pre-decrement is also required::
+If you wish to create a counting iterator that is a Bidirectional
+Traversal Iterator and also Bidirectional Iterator, then pre-decrement
+is also required::
 
     --i
 
 If you wish to create a counting iterator that is a Random Access
-Traversal Iterator, then these additional expressions are also
-required::
+Traversal Iterator and also Random Access Iterator, then these
+additional expressions are also required::
 
     counting_iterator::difference_type n;
     i += n
diff --git a/doc/facade-and-adaptor.html b/doc/facade-and-adaptor.html
index c9a07a2..caa0d7f 100755
--- a/doc/facade-and-adaptor.html
+++ b/doc/facade-and-adaptor.html
@@ -1327,9 +1327,9 @@ if (Difference is use_default)
 else
     typedef Difference difference_type;
 
-

The member indirect_iterator::iterator_category is a type that -satisfies the requirements of the concepts modeled by the indirect -iterator as specified in the models section.

+

The member iterator_category is a type that satisfies the +requirements of the concepts modeled by the indirect_iterator as +specified in the models section.

indirect_iterator requirements

@@ -2061,6 +2061,12 @@ template < class counting_iterator { public: + typedef Incrementable value_type; + typedef const Incrementable& reference; + typedef const Incrementable* pointer; + typedef /* see below */ difference_type; + typedef /* see below */ iterator_category; + counting_iterator(); counting_iterator(counting_iterator const& rhs); explicit counting_iterator(Incrementable x); @@ -2072,6 +2078,12 @@ class counting_iterator Incrementable m_inc; // exposition }; +

If the Diference 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.

[Note: implementers are encouraged to provide an implementation of
distance_to and a difference_type that avoids overflows in @@ -2081,27 +2093,28 @@ the cases when the Incrementable

counting_iterator requirements

The Incrementable type must be Default Constructible, Copy -Constructible, and Assignable. The default distance is -an implementation defined signed integral type.

+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, then the following expressions must be valid:

+

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:

 Incrementable i, j;
 ++i         // pre-increment
 i == j      // operator equal
 
-

If you wish to create a counting iterator that is a -Bidirectional Traversal Iterator, then pre-decrement is also required:

+

If you wish to create a counting iterator that is a Bidirectional +Traversal Iterator and also Bidirectional Iterator, then pre-decrement +is also required:

 --i
 

If you wish to create a counting iterator that is a Random Access -Traversal Iterator, then these additional expressions are also -required:

+Traversal Iterator and also Random Access Iterator, then these +additional expressions are also required:

 counting_iterator::difference_type n;
 i += n
@@ -2308,7 +2321,7 @@ LocalWords:  OtherIncrementable Coplien -->
 
 
 
diff --git a/doc/indirect_iterator.html b/doc/indirect_iterator.html
index f0aa387..fb57d17 100644
--- a/doc/indirect_iterator.html
+++ b/doc/indirect_iterator.html
@@ -125,9 +125,9 @@ if (Difference is use_default)
 else
     typedef Difference difference_type;
 
-

The member indirect_iterator::iterator_category is a type that -satisfies the requirements of the concepts modeled by the indirect -iterator as specified in the models section.

+

The member iterator_category is a type that satisfies the +requirements of the concepts modeled by the indirect_iterator as +specified in the models section.

indirect_iterator requirements

@@ -315,7 +315,7 @@ a,b,c,d,e,f,g, diff --git a/doc/indirect_iterator_ref.rst b/doc/indirect_iterator_ref.rst index e385364..ebe22ac 100644 --- a/doc/indirect_iterator_ref.rst +++ b/doc/indirect_iterator_ref.rst @@ -67,9 +67,9 @@ following pseudo-code. We use the abbreviation typedef Difference difference_type; -The member ``indirect_iterator::iterator_category`` is a type that -satisfies the requirements of the concepts modeled by the indirect -iterator as specified in the models section. +The member ``iterator_category`` is a type that satisfies the +requirements of the concepts modeled by the ``indirect_iterator`` as +specified in the models section. ``indirect_iterator`` requirements diff --git a/doc/iter-issue-list.rst b/doc/iter-issue-list.rst index 17666cf..03351a0 100644 --- a/doc/iter-issue-list.rst +++ b/doc/iter-issue-list.rst @@ -271,7 +271,11 @@ The description of Counting iterator is unclear. "The counting iterator adaptor dereference by returning a reference to the base object. The other operations are implemented by the base m_iterator, as per the inheritance from iterator_adaptor." -:Proposed resolution: **Needs work** (Jeremy) Reword. +:Proposed resolution: + Change the introduction to: ``counting_iterator`` adapts an + arithmetic type, such as ``int``, by adding an ``operator*`` that + returns the current value of the object. + 9.14 Counting_iterator's difference type @@ -290,8 +294,11 @@ I'm not sure what this means. The user provides a template argument named Differ there's no difference_type. I assume this is just a glitch in the wording. But if implementors are encouraged to ignore this argument if it won't work right, why is it there? -:Proposed resolution: **Needs work** (Jeremy) - Reword. +:Proposed resolution: + The ``difference_type`` was inherited from ``iterator_adaptor``. + However, we've removed the explicit inheritance, so explicit typedefs have + been added. + 9.15 How to detect lvalueness?