diff --git a/doc/iter-issue-list.rst b/doc/iter-issue-list.rst index f5d6e40..c20d065 100644 --- a/doc/iter-issue-list.rst +++ b/doc/iter-issue-list.rst @@ -208,8 +208,10 @@ reverse iterator "flips the direction of the base iterator's motion". This needs as in the current standard. Something like: "iterates through the controlled sequence in the opposite direction" -:Proposed resolution: **Needs work** (Jeremy) - We agree and need to find wording. +:Proposed resolution: + Change the introduction to: The reverse iterator adaptor iterates + through the adapted iterator range in the opposite direction. + 9.10 'prior' is undefined ========================= @@ -220,8 +222,16 @@ opposite direction" reverse_iterator::dereference is specified as calling a function named 'prior' which has no specification. -:Proposed resolution: **Needs language** (Jeremy) - Replace use of prior with what it does. +:Proposed resolution: + Change the specification to avoid using ``prior`` as follows. + +:Effects: + +:: + + Iterator tmp = m_iterator; + return *--tmp; + 9.11 "In other words" is bad wording @@ -237,7 +247,7 @@ words" always means "I didn't say it right, so I'll try again." We need to say i Reword. -9.12 Transform_iterator shouldn’t mandate private member +9.12 Transform_iterator shouldn't mandate private member ======================================================== :Submitter: Pete Becker diff --git a/doc/reverse_iterator.html b/doc/reverse_iterator.html index f275bc3..c0251c1 100644 --- a/doc/reverse_iterator.html +++ b/doc/reverse_iterator.html @@ -40,10 +40,8 @@ Railway Operation and Construction - -

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.

+

The reverse iterator adaptor iterates through the adapted iterator +range in the opposite direction.

Table of Contents

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.

+

The concepts that reverse_iterator models are dependent on what +concepts the Iterator argument models, as specified in the +following tables.

+ ++++ + + + + + + + + + + + + + +
If Iterator modelsthen reverse_iterator models
Bidirectional Traversal IteratorBidirectional Traversal Iterator
Random Access Traversal IteratorRandom Access Traversal Iterator
+ ++++ + + + + + + + + + + + + + + + + +
If Iterator modelsthen reverse_iterator models
Readable IteratorReadable Iterator
Writable IteratorWritable Iterator
Lvalue IteratorLvalue Iterator
+ ++++ + + + + + + + + + + + + + + + + + + + +
If Iterator modelsthen reverse_iterator models
Readable Lvalue Iterator, +Bidirectional Traversal IteratorBidirectional Iterator
Writable Lvalue Iterator, +Bidirectional Traversal IteratorMutable Bidirectional Iterator
Readable Lvalue Iterator, +Random Access Traversal IteratorRandom Access Iterator
Writable Lvalue Iterator, +Random Access Traversal IteratorMutable Random Access Iterator

reverse_iterator operations

@@ -154,7 +221,7 @@ reverse_iterator(
 Iterator tmp = m_iterator;
-return *..tmp;
+return *--tmp;
 

reverse_iterator& operator++();

@@ -231,7 +298,7 @@ sequence in double-reversed (normal) order: hello world! diff --git a/doc/reverse_iterator_abstract.rst b/doc/reverse_iterator_abstract.rst index 0574988..a4caee5 100644 --- a/doc/reverse_iterator_abstract.rst +++ b/doc/reverse_iterator_abstract.rst @@ -1,6 +1,9 @@ -.. I think we'd better strike the old reverse_iterator text from the standard, eh? -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. +The reverse iterator adaptor iterates through the adapted iterator +range in the opposite direction. + + + + + diff --git a/doc/reverse_iterator_ref.rst b/doc/reverse_iterator_ref.rst index ea6e54d..b38f4d9 100644 --- a/doc/reverse_iterator_ref.rst +++ b/doc/reverse_iterator_ref.rst @@ -31,10 +31,46 @@ 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. +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 Iterator | +| Bidirectional Traversal Iterator | | ++-------------------------------------------------------+----------------------------------+ +| Writable Lvalue Iterator, | Mutable Bidirectional Iterator | +| Bidirectional Traversal Iterator | | ++-------------------------------------------------------+----------------------------------+ +| Readable Lvalue Iterator, | Random Access Iterator | +| Random Access Traversal Iterator | | ++-------------------------------------------------------+----------------------------------+ +| Writable Lvalue Iterator, | Mutable Random Access Iterator | +| Random Access Traversal Iterator | | ++-------------------------------------------------------+----------------------------------+ + + @@ -85,7 +121,7 @@ operations. :: Iterator tmp = m_iterator; - return *..tmp; + return *--tmp; ``reverse_iterator& operator++();``