tweaked the models section of counting_iterator

[SVN r21678]
This commit is contained in:
Jeremy Siek
2004-01-13 14:22:39 +00:00
parent d70b0d3f05
commit 6cf1230c13
3 changed files with 30 additions and 17 deletions

View File

@ -97,8 +97,7 @@ type. Otherwise <tt class="literal"><span class="pre">difference_type</span></tt
<tt class="literal"><span class="pre">numeric_limits&lt;Incrementable&gt;::is_specialized</span></tt>, then
<tt class="literal"><span class="pre">iterator_category</span></tt> is a type convertible to
<tt class="literal"><span class="pre">random_access_iterator_tag</span></tt>. Otherwise, <tt class="literal"><span class="pre">iterator_category</span></tt> is
unspecified, and the <tt class="literal"><span class="pre">counting_iterator</span></tt> specialization models the
same iterator traversal concepts modeled by <tt class="literal"><span class="pre">Incrementable</span></tt>.</p>
unspecified.</p>
<dl>
<dt>[<em>Note:</em> implementers are encouraged to provide an implementation of</dt>
<dd><tt class="literal"><span class="pre">operator-</span></tt> and a <tt class="literal"><span class="pre">difference_type</span></tt> that avoids overflows in
@ -135,9 +134,14 @@ i &lt; j;
<h1><a class="toc-backref" href="#id4" name="counting-iterator-models"><tt class="literal"><span class="pre">counting_iterator</span></tt> models</a></h1>
<p>Specializations of <tt class="literal"><span class="pre">counting_iterator</span></tt> model Readable Lvalue
Iterator. In addition, they model the concepts corresponding to the
iterator tags to which their <tt class="literal"><span class="pre">iterator_category</span></tt> is convertible and
also corresponding to <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt> when
<tt class="literal"><span class="pre">CategoryOrTraversal</span></tt> is an iterator tag (and not <tt class="literal"><span class="pre">use_default</span></tt>).</p>
iterator tags to which their <tt class="literal"><span class="pre">iterator_category</span></tt> is convertible.
Also, if <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt> is not <tt class="literal"><span class="pre">use_default</span></tt> then
<tt class="literal"><span class="pre">counting_iterator</span></tt> models the concept corresponding to the iterator
tag <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt>. Otherwise, if
<tt class="literal"><span class="pre">numeric_limits&lt;Incrementable&gt;::is_specialized</span></tt>, then
<tt class="literal"><span class="pre">counting_iterator</span></tt> models Random Access Traversal Iterator.
Otherwise, <tt class="literal"><span class="pre">counting_iterator</span></tt> models the same iterator traversal
concepts modeled by <tt class="literal"><span class="pre">Incrementable</span></tt>.</p>
</div>
<div class="section" id="counting-iterator-operations">
<h1><a class="toc-backref" href="#id5" name="counting-iterator-operations"><tt class="literal"><span class="pre">counting_iterator</span></tt> operations</a></h1>
@ -264,7 +268,7 @@ indirectly printing out the numbers from 0 to 7
<hr class="footer" />
<div class="footer">
<a class="reference" href="counting_iterator.rst">View document source</a>.
Generated on: 2004-01-13 14:10 UTC.
Generated on: 2004-01-13 14:22 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

@ -35,8 +35,7 @@ If ``CategoryOrTraversal`` is not ``use_default`` then the member
``numeric_limits<Incrementable>::is_specialized``, then
``iterator_category`` is a type convertible to
``random_access_iterator_tag``. Otherwise, ``iterator_category`` is
unspecified, and the ``counting_iterator`` specialization models the
same iterator traversal concepts modeled by ``Incrementable``.
unspecified.
[*Note:* implementers are encouraged to provide an implementation of
``operator-`` and a ``difference_type`` that avoids overflows in
@ -75,9 +74,15 @@ the following must must also be valid::
Specializations of ``counting_iterator`` model Readable Lvalue
Iterator. In addition, they model the concepts corresponding to the
iterator tags to which their ``iterator_category`` is convertible and
also corresponding to ``CategoryOrTraversal`` when
``CategoryOrTraversal`` is an iterator tag (and not ``use_default``).
iterator tags to which their ``iterator_category`` is convertible.
Also, if ``CategoryOrTraversal`` is not ``use_default`` then
``counting_iterator`` models the concept corresponding to the iterator
tag ``CategoryOrTraversal``. Otherwise, if
``numeric_limits<Incrementable>::is_specialized``, then
``counting_iterator`` models Random Access Traversal Iterator.
Otherwise, ``counting_iterator`` models the same iterator traversal
concepts modeled by ``Incrementable``.
``counting_iterator`` operations

View File

@ -2134,8 +2134,7 @@ type. Otherwise <tt class="literal"><span class="pre">difference_type</span></tt
<tt class="literal"><span class="pre">numeric_limits&lt;Incrementable&gt;::is_specialized</span></tt>, then
<tt class="literal"><span class="pre">iterator_category</span></tt> is a type convertible to
<tt class="literal"><span class="pre">random_access_iterator_tag</span></tt>. Otherwise, <tt class="literal"><span class="pre">iterator_category</span></tt> is
unspecified, and the <tt class="literal"><span class="pre">counting_iterator</span></tt> specialization models the
same iterator traversal concepts modeled by <tt class="literal"><span class="pre">Incrementable</span></tt>.</p>
unspecified.</p>
<dl>
<dt>[<em>Note:</em> implementers are encouraged to provide an implementation of</dt>
<dd><tt class="literal"><span class="pre">operator-</span></tt> and a <tt class="literal"><span class="pre">difference_type</span></tt> that avoids overflows in
@ -2172,9 +2171,14 @@ i &lt; j;
<h4><a class="toc-backref" href="#id64" name="counting-iterator-models"><tt class="literal"><span class="pre">counting_iterator</span></tt> models</a></h4>
<p>Specializations of <tt class="literal"><span class="pre">counting_iterator</span></tt> model Readable Lvalue
Iterator. In addition, they model the concepts corresponding to the
iterator tags to which their <tt class="literal"><span class="pre">iterator_category</span></tt> is convertible and
also corresponding to <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt> when
<tt class="literal"><span class="pre">CategoryOrTraversal</span></tt> is an iterator tag (and not <tt class="literal"><span class="pre">use_default</span></tt>).</p>
iterator tags to which their <tt class="literal"><span class="pre">iterator_category</span></tt> is convertible.
Also, if <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt> is not <tt class="literal"><span class="pre">use_default</span></tt> then
<tt class="literal"><span class="pre">counting_iterator</span></tt> models the concept corresponding to the iterator
tag <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt>. Otherwise, if
<tt class="literal"><span class="pre">numeric_limits&lt;Incrementable&gt;::is_specialized</span></tt>, then
<tt class="literal"><span class="pre">counting_iterator</span></tt> models Random Access Traversal Iterator.
Otherwise, <tt class="literal"><span class="pre">counting_iterator</span></tt> models the same iterator traversal
concepts modeled by <tt class="literal"><span class="pre">Incrementable</span></tt>.</p>
</div>
<div class="section" id="counting-iterator-operations">
<h4><a class="toc-backref" href="#id65" name="counting-iterator-operations"><tt class="literal"><span class="pre">counting_iterator</span></tt> operations</a></h4>
@ -2346,7 +2350,7 @@ LocalWords: OtherIncrementable Coplien -->
<hr class="footer" />
<div class="footer">
<a class="reference" href="facade-and-adaptor.rst">View document source</a>.
Generated on: 2004-01-13 14:13 UTC.
Generated on: 2004-01-13 14:22 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>