mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-20 08:02:10 +02:00
more work on the specification of iterator_category
[SVN r21662]
This commit is contained in:
@ -80,9 +80,20 @@ private:
|
||||
Iterator m_iterator; // exposition
|
||||
};
|
||||
</pre>
|
||||
<p>The <tt class="literal"><span class="pre">iterator_category</span></tt> member is a type convertible to the tags
|
||||
corresponding to each standard concept modeled by
|
||||
<tt class="literal"><span class="pre">reverse_iterator</span></tt>, as described in the models section.</p>
|
||||
<p>The <tt class="literal"><span class="pre">iterator_category</span></tt> member is a type convertible to the iterator
|
||||
tag given by the following algorithm. Let <tt class="literal"><span class="pre">T</span></tt> be
|
||||
<tt class="literal"><span class="pre">iterator_traits<Iterator>::value_type</span></tt>, <tt class="literal"><span class="pre">R</span></tt> be
|
||||
<tt class="literal"><span class="pre">iterator_traits<Iterator>::reference</span></tt>, and <tt class="literal"><span class="pre">C</span></tt> be
|
||||
<tt class="literal"><span class="pre">traveral_category<Iterator>::type</span></tt>.</p>
|
||||
<pre class="literal-block">
|
||||
if (R is a reference to T) then
|
||||
if (C is convertible to random_access_traversal_tag) then
|
||||
random_access_iterator_tag
|
||||
else
|
||||
bidirectional_iterator_tag
|
||||
else
|
||||
input_iterator_tag
|
||||
</pre>
|
||||
</div>
|
||||
<div class="section" id="reverse-iterator-requirements">
|
||||
<h1><a class="toc-backref" href="#id3" name="reverse-iterator-requirements"><tt class="literal"><span class="pre">reverse_iterator</span></tt> requirements</a></h1>
|
||||
@ -266,7 +277,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-13 02:54 UTC.
|
||||
Generated on: 2004-01-13 05:39 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>
|
||||
|
Reference in New Issue
Block a user