resolved issue with reverse iterator abstract

[SVN r21637]
This commit is contained in:
Jeremy Siek
2004-01-12 18:31:01 +00:00
parent 24052c3dff
commit 8181625365
4 changed files with 140 additions and 24 deletions

View File

@ -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<EFBFBD>t mandate private member
9.12 Transform_iterator shouldn't mandate private member
========================================================
:Submitter: Pete Becker

View File

@ -40,10 +40,8 @@ Railway Operation and Construction</a></td></tr>
</tr>
</tbody>
</table>
<!-- I think we'd better strike the old reverse_iterator text from the standard, eh? -->
<p>The reverse iterator adaptor flips the direction of a base iterator's
motion. Invoking <tt class="literal"><span class="pre">operator++()</span></tt> moves the base iterator backward and
invoking <tt class="literal"><span class="pre">operator--()</span></tt> moves the base iterator forward.</p>
<p>The reverse iterator adaptor iterates through the adapted iterator
range in the opposite direction.</p>
<div class="contents topic" id="table-of-contents">
<p class="topic-title"><a name="table-of-contents">Table of Contents</a></p>
<ul class="simple">
@ -85,10 +83,79 @@ Iterator and Readable Iterator.</p>
</div>
<div class="section" id="reverse-iterator-models">
<h1><a class="toc-backref" href="#id4" name="reverse-iterator-models"><tt class="literal"><span class="pre">reverse_iterator</span></tt> models</a></h1>
<p><tt class="literal"><span class="pre">reverse_iterator</span></tt> models Bidirectional Traversal Iterator and
Readable Iterator. In addition, <tt class="literal"><span class="pre">reverse_iterator</span></tt> models the same
standard iterator access concepts that the <tt class="literal"><span class="pre">Iterator</span></tt>
argument models.</p>
<p>The concepts that <tt class="literal"><span class="pre">reverse_iterator</span></tt> models are dependent on what
concepts the <tt class="literal"><span class="pre">Iterator</span></tt> argument models, as specified in the
following tables.</p>
<table class="table" frame="border" rules="all">
<colgroup>
<col width="48%" />
<col width="52%" />
</colgroup>
<thead valign="bottom">
<tr><th>If <tt class="literal"><span class="pre">Iterator</span></tt> models</th>
<th>then <tt class="literal"><span class="pre">reverse_iterator</span></tt> models</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>Bidirectional Traversal Iterator</td>
<td>Bidirectional Traversal Iterator</td>
</tr>
<tr><td>Random Access Traversal Iterator</td>
<td>Random Access Traversal Iterator</td>
</tr>
</tbody>
</table>
<table class="table" frame="border" rules="all">
<colgroup>
<col width="41%" />
<col width="59%" />
</colgroup>
<thead valign="bottom">
<tr><th>If <tt class="literal"><span class="pre">Iterator</span></tt> models</th>
<th>then <tt class="literal"><span class="pre">reverse_iterator</span></tt> models</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>Readable Iterator</td>
<td>Readable Iterator</td>
</tr>
<tr><td>Writable Iterator</td>
<td>Writable Iterator</td>
</tr>
<tr><td>Lvalue Iterator</td>
<td>Lvalue Iterator</td>
</tr>
</tbody>
</table>
<table class="table" frame="border" rules="all">
<colgroup>
<col width="62%" />
<col width="38%" />
</colgroup>
<thead valign="bottom">
<tr><th>If <tt class="literal"><span class="pre">Iterator</span></tt> models</th>
<th>then <tt class="literal"><span class="pre">reverse_iterator</span></tt> models</th>
</tr>
</thead>
<tbody valign="top">
<tr><td>Readable Lvalue Iterator,
Bidirectional Traversal Iterator</td>
<td>Bidirectional Iterator</td>
</tr>
<tr><td>Writable Lvalue Iterator,
Bidirectional Traversal Iterator</td>
<td>Mutable Bidirectional Iterator</td>
</tr>
<tr><td>Readable Lvalue Iterator,
Random Access Traversal Iterator</td>
<td>Random Access Iterator</td>
</tr>
<tr><td>Writable Lvalue Iterator,
Random Access Traversal Iterator</td>
<td>Mutable Random Access Iterator</td>
</tr>
</tbody>
</table>
</div>
<div class="section" id="reverse-iterator-operations">
<h1><a class="toc-backref" href="#id5" name="reverse-iterator-operations"><tt class="literal"><span class="pre">reverse_iterator</span></tt> operations</a></h1>
@ -154,7 +221,7 @@ reverse_iterator(
</table>
<pre class="literal-block">
Iterator tmp = m_iterator;
return *..tmp;
return *--tmp;
</pre>
<p><tt class="literal"><span class="pre">reverse_iterator&amp;</span> <span class="pre">operator++();</span></tt></p>
<table class="field-list" frame="void" rules="none">
@ -231,7 +298,7 @@ sequence in double-reversed (normal) order: hello world!
<hr class="footer"/>
<div class="footer">
<a class="reference" href="reverse_iterator.rst">View document source</a>.
Generated on: 2004-01-12 16:04 UTC.
Generated on: 2004-01-12 18:23 UTC.
Generated by <a class="reference" href="http://docutils.sourceforge.net/">Docutils</a> from <a class="reference" href="http://docutils.sourceforge.net/rst.html">reStructuredText</a> source.
</div>
</body>

View File

@ -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.

View File

@ -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++();``