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>