mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-30 12:57:23 +02:00
resolved issue with reverse iterator abstract
[SVN r21637]
This commit is contained in:
@ -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
|
as in the current standard. Something like: "iterates through the controlled sequence in the
|
||||||
opposite direction"
|
opposite direction"
|
||||||
|
|
||||||
:Proposed resolution: **Needs work** (Jeremy)
|
:Proposed resolution:
|
||||||
We agree and need to find wording.
|
Change the introduction to: The reverse iterator adaptor iterates
|
||||||
|
through the adapted iterator range in the opposite direction.
|
||||||
|
|
||||||
|
|
||||||
9.10 'prior' is undefined
|
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
|
reverse_iterator::dereference is specified as calling a function named 'prior' which has no
|
||||||
specification.
|
specification.
|
||||||
|
|
||||||
:Proposed resolution: **Needs language** (Jeremy)
|
:Proposed resolution:
|
||||||
Replace use of prior with what it does.
|
Change the specification to avoid using ``prior`` as follows.
|
||||||
|
|
||||||
|
:Effects:
|
||||||
|
|
||||||
|
::
|
||||||
|
|
||||||
|
Iterator tmp = m_iterator;
|
||||||
|
return *--tmp;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
9.11 "In other words" is bad wording
|
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.
|
Reword.
|
||||||
|
|
||||||
9.12 Transform_iterator shouldn<EFBFBD>t mandate private member
|
9.12 Transform_iterator shouldn't mandate private member
|
||||||
========================================================
|
========================================================
|
||||||
|
|
||||||
:Submitter: Pete Becker
|
:Submitter: Pete Becker
|
||||||
|
@ -40,10 +40,8 @@ Railway Operation and Construction</a></td></tr>
|
|||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<!-- I think we'd better strike the old reverse_iterator text from the standard, eh? -->
|
<p>The reverse iterator adaptor iterates through the adapted iterator
|
||||||
<p>The reverse iterator adaptor flips the direction of a base iterator's
|
range in the opposite direction.</p>
|
||||||
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>
|
|
||||||
<div class="contents topic" id="table-of-contents">
|
<div class="contents topic" id="table-of-contents">
|
||||||
<p class="topic-title"><a name="table-of-contents">Table of Contents</a></p>
|
<p class="topic-title"><a name="table-of-contents">Table of Contents</a></p>
|
||||||
<ul class="simple">
|
<ul class="simple">
|
||||||
@ -85,10 +83,79 @@ Iterator and Readable Iterator.</p>
|
|||||||
</div>
|
</div>
|
||||||
<div class="section" id="reverse-iterator-models">
|
<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>
|
<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
|
<p>The concepts that <tt class="literal"><span class="pre">reverse_iterator</span></tt> models are dependent on what
|
||||||
Readable Iterator. In addition, <tt class="literal"><span class="pre">reverse_iterator</span></tt> models the same
|
concepts the <tt class="literal"><span class="pre">Iterator</span></tt> argument models, as specified in the
|
||||||
standard iterator access concepts that the <tt class="literal"><span class="pre">Iterator</span></tt>
|
following tables.</p>
|
||||||
argument models.</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>
|
||||||
<div class="section" id="reverse-iterator-operations">
|
<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>
|
<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>
|
</table>
|
||||||
<pre class="literal-block">
|
<pre class="literal-block">
|
||||||
Iterator tmp = m_iterator;
|
Iterator tmp = m_iterator;
|
||||||
return *..tmp;
|
return *--tmp;
|
||||||
</pre>
|
</pre>
|
||||||
<p><tt class="literal"><span class="pre">reverse_iterator&</span> <span class="pre">operator++();</span></tt></p>
|
<p><tt class="literal"><span class="pre">reverse_iterator&</span> <span class="pre">operator++();</span></tt></p>
|
||||||
<table class="field-list" frame="void" rules="none">
|
<table class="field-list" frame="void" rules="none">
|
||||||
@ -231,7 +298,7 @@ sequence in double-reversed (normal) order: hello world!
|
|||||||
<hr class="footer"/>
|
<hr class="footer"/>
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<a class="reference" href="reverse_iterator.rst">View document source</a>.
|
<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.
|
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>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -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
|
The reverse iterator adaptor iterates through the adapted iterator
|
||||||
motion. Invoking ``operator++()`` moves the base iterator backward and
|
range in the opposite direction.
|
||||||
invoking ``operator--()`` moves the base iterator forward.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,10 +31,46 @@ Iterator and Readable Iterator.
|
|||||||
``reverse_iterator`` models
|
``reverse_iterator`` models
|
||||||
...........................
|
...........................
|
||||||
|
|
||||||
``reverse_iterator`` models Bidirectional Traversal Iterator and
|
The concepts that ``reverse_iterator`` models are dependent on what
|
||||||
Readable Iterator. In addition, ``reverse_iterator`` models the same
|
concepts the ``Iterator`` argument models, as specified in the
|
||||||
standard iterator access concepts that the ``Iterator``
|
following tables.
|
||||||
argument models.
|
|
||||||
|
+----------------------------------+-------------------------------------+
|
||||||
|
| 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;
|
Iterator tmp = m_iterator;
|
||||||
return *..tmp;
|
return *--tmp;
|
||||||
|
|
||||||
|
|
||||||
``reverse_iterator& operator++();``
|
``reverse_iterator& operator++();``
|
||||||
|
Reference in New Issue
Block a user