updated as per Dave's comments (about Interoperable Iterators)

[SVN r21730]
This commit is contained in:
Jeremy Siek
2004-01-14 14:25:45 +00:00
parent 5049bcdce5
commit 8a0e9a4fe5

View File

@ -7,7 +7,7 @@
<title>New Iterator Concepts</title>
<meta name="author" content="David Abrahams, Jeremy Siek, Thomas Witt" />
<meta name="organization" content="Boost Consulting, Indiana University Open Systems Lab, University of Hanover Institute for Transport Railway Operation and Construction" />
<meta name="date" content="2004-01-13" />
<meta name="date" content="2004-01-14" />
<meta name="copyright" content="Copyright David Abrahams, Jeremy Siek, and Thomas Witt 2003. All rights reserved" />
<link rel="stylesheet" href="default.css" type="text/css" />
</head>
@ -27,7 +27,7 @@
Systems Lab</a>, University of Hanover <a class="last reference" href="http://www.ive.uni-hannover.de">Institute for
Transport Railway Operation and Construction</a></td></tr>
<tr><th class="docinfo-name">Date:</th>
<td>2004-01-13</td></tr>
<td>2004-01-14</td></tr>
<tr class="field"><th class="docinfo-name">Number:</th><td class="field-body">This is a revised version of <a class="reference" href="http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/papers/2003/n1550.html">n1550</a>=03-0133, which was
accepted for Technical Report 1 by the C++ standard
committee's library working group. This proposal is a
@ -832,9 +832,6 @@ respect the stated semantics. In the tables below, <tt class="literal"><span cla
of type <tt class="literal"><span class="pre">X</span></tt>, <tt class="literal"><span class="pre">y</span></tt> is an object of type <tt class="literal"><span class="pre">Y</span></tt>, <tt class="literal"><span class="pre">Distance</span></tt> is
<tt class="literal"><span class="pre">iterator_traits&lt;Y&gt;::difference_type</span></tt>, and <tt class="literal"><span class="pre">n</span></tt> represents a
constant object of type <tt class="literal"><span class="pre">Distance</span></tt>.</p>
<p>If the traversal tags for <tt class="literal"><span class="pre">X</span></tt> and <tt class="literal"><span class="pre">Y</span></tt> are convertible to
<tt class="literal"><span class="pre">single_pass_traversal_tag</span></tt> then the following requirements must be
met.</p>
<table border class="table">
<colgroup>
<col width="30%" />
@ -874,9 +871,8 @@ met.</p>
</tr>
</tbody>
</table>
<p>If the traversal tags for <tt class="literal"><span class="pre">X</span></tt> and <tt class="literal"><span class="pre">Y</span></tt> are convertible to
<tt class="literal"><span class="pre">random_access_traversal_tag</span></tt> then the following requirements must
be met.</p>
<p>If <tt class="literal"><span class="pre">X</span></tt> and <tt class="literal"><span class="pre">Y</span></tt> both model Random Access Traversal Iterator then
the following additional requirements must be met.</p>
<table border class="table">
<colgroup>
<col width="31%" />
@ -939,9 +935,7 @@ ordering relation</td>
</tr>
<tr><td><tt class="literal"><span class="pre">y</span> <span class="pre">-</span> <span class="pre">x</span></tt></td>
<td><tt class="literal"><span class="pre">Distance</span></tt></td>
<td><tt class="literal"><span class="pre">x</span> <span class="pre">&lt;</span> <span class="pre">y</span> <span class="pre">?</span>
<span class="pre">distance(Y(x),y)</span>
<span class="pre">:</span> <span class="pre">-distance(y,Y(x))</span></tt></td>
<td><tt class="literal"><span class="pre">distance(Y(x),y)</span></tt></td>
<td>pre: there exists a
value <tt class="literal"><span class="pre">n</span></tt> of
<tt class="literal"><span class="pre">Distance</span></tt> such that
@ -950,9 +944,7 @@ value <tt class="literal"><span class="pre">n</span></tt> of
</tr>
<tr><td><tt class="literal"><span class="pre">x</span> <span class="pre">-</span> <span class="pre">y</span></tt></td>
<td><tt class="literal"><span class="pre">Distance</span></tt></td>
<td><tt class="literal"><span class="pre">y</span> <span class="pre">&lt;</span> <span class="pre">x</span> <span class="pre">?</span>
<span class="pre">distance(y,Y(x))</span>
<span class="pre">:</span> <span class="pre">-distance(Y(x),y)</span></tt></td>
<td><tt class="literal"><span class="pre">distance(y,Y(x))</span></tt></td>
<td>pre: there exists a
value <tt class="literal"><span class="pre">n</span></tt> of
<tt class="literal"><span class="pre">Distance</span></tt> such that