mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-30 04:47:20 +02:00
checkpoint
[SVN r20728]
This commit is contained in:
@ -246,7 +246,7 @@ at <a class="reference" href="http://www.boost.org/LICENSE_1_0.txt">http://www.b
|
||||
</li>
|
||||
<li><a class="reference" href="#proposed-solution-in-progress" id="id16" name="id16">Proposed Solution (in progress)</a><ul>
|
||||
<li><a class="reference" href="#overview" id="id17" name="id17">Overview</a></li>
|
||||
<li><a class="reference" href="#details" id="id18" name="id18">Details</a></li>
|
||||
<li><a class="reference" href="#future-enhancements" id="id18" name="id18">Future Enhancements</a></li>
|
||||
<li><a class="reference" href="#impact-on-n1530-iterator-facade-and-adaptor" id="id19" name="id19">Impact on N1530 (Iterator Facade and Adaptor)</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
@ -470,15 +470,20 @@ information, we'll change <tt class="literal"><span class="pre">iterator_tag</sp
|
||||
old-style category in terms of the iterator's traversal category,
|
||||
<tt class="literal"><span class="pre">reference</span></tt>, and <tt class="literal"><span class="pre">value_type</span></tt>.</p>
|
||||
</div>
|
||||
<div class="section" id="details">
|
||||
<h2><a class="toc-backref" href="#id18" name="details">Details</a></h2>
|
||||
<p>A cleaner solution would change <tt class="literal"><span class="pre">iterator_traits</span></tt> as follows,
|
||||
though this does not constitute a "pure bolt-on":</p>
|
||||
<div class="section" id="future-enhancements">
|
||||
<h2><a class="toc-backref" href="#id18" name="future-enhancements">Future Enhancements</a></h2>
|
||||
<p>For C++0x, we could consider a change to <tt class="literal"><span class="pre">iterator_traits</span></tt> which
|
||||
allows the user to avoid the use of iterator_tag (or similar
|
||||
devices) altogether and write a new-style iterator by specifying
|
||||
only a traversal tag. This change is not being proposed as it does
|
||||
not constitute a "pure bolt-on":</p>
|
||||
<pre class="literal-block">
|
||||
iterator_traits<I>::iterator_category
|
||||
= if (I::iterator_category is a type) // use mpl::has_xxx (SFINAE)
|
||||
return I::iterator_category
|
||||
|
||||
// Only old-style output iterators may have a void value_type
|
||||
// or difference_type
|
||||
if (iterator_value_type<I>::type is void
|
||||
|| iterator_difference_type<I>::type is void
|
||||
)
|
||||
@ -513,7 +518,7 @@ iterator_traits<I>::iterator_category
|
||||
<hr class="footer" />
|
||||
<div class="footer">
|
||||
<a class="reference" href="issues.rst">View document source</a>.
|
||||
Generated on: 2003-11-06 03:02 UTC.
|
||||
Generated on: 2003-11-07 19:02 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>
|
||||
|
@ -260,16 +260,21 @@ information, we'll change ``iterator_tag`` so that it computes the
|
||||
old-style category in terms of the iterator's traversal category,
|
||||
``reference``, and ``value_type``.
|
||||
|
||||
Details
|
||||
=======
|
||||
Future Enhancements
|
||||
===================
|
||||
|
||||
A cleaner solution would change ``iterator_traits`` as follows,
|
||||
though this does not constitute a "pure bolt-on"::
|
||||
For C++0x, we could consider a change to ``iterator_traits`` which
|
||||
allows the user to avoid the use of iterator_tag (or similar
|
||||
devices) altogether and write a new-style iterator by specifying
|
||||
only a traversal tag. This change is not being proposed as it does
|
||||
not constitute a "pure bolt-on"::
|
||||
|
||||
iterator_traits<I>::iterator_category
|
||||
= if (I::iterator_category is a type) // use mpl::has_xxx (SFINAE)
|
||||
return I::iterator_category
|
||||
|
||||
// Only old-style output iterators may have a void value_type
|
||||
// or difference_type
|
||||
if (iterator_value_type<I>::type is void
|
||||
|| iterator_difference_type<I>::type is void
|
||||
)
|
||||
|
Reference in New Issue
Block a user