mirror of
https://github.com/boostorg/iterator.git
synced 2025-07-30 21:07:20 +02:00
more fixes from Dave
[SVN r21676]
This commit is contained in:
@ -94,21 +94,20 @@ class counting_iterator
|
|||||||
type. Otherwise <tt class="literal"><span class="pre">difference_type</span></tt> is <tt class="literal"><span class="pre">Difference</span></tt>.</p>
|
type. Otherwise <tt class="literal"><span class="pre">difference_type</span></tt> is <tt class="literal"><span class="pre">Difference</span></tt>.</p>
|
||||||
<p>If <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt> is not <tt class="literal"><span class="pre">use_default</span></tt> then the member
|
<p>If <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt> is not <tt class="literal"><span class="pre">use_default</span></tt> then the member
|
||||||
<tt class="literal"><span class="pre">iterator_category</span></tt> is <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt>. Otherwise, if
|
<tt class="literal"><span class="pre">iterator_category</span></tt> is <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt>. Otherwise, if
|
||||||
<tt class="literal"><span class="pre">Incrementable</span></tt> is a numberic type <tt class="literal"><span class="pre">iterator_category</span></tt> is a
|
<tt class="literal"><span class="pre">numeric_limits<Incrementable>::is_specialized</span></tt>, then
|
||||||
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 a type convertible to
|
||||||
<tt class="literal"><span class="pre">iterator_category</span></tt> is unspecified, and the <tt class="literal"><span class="pre">counting_iterator</span></tt>
|
<tt class="literal"><span class="pre">random_access_iterator_tag</span></tt>. Otherwise, <tt class="literal"><span class="pre">iterator_category</span></tt> is
|
||||||
specialization models the same iterator traversal concepts modeled
|
unspecified, and the <tt class="literal"><span class="pre">counting_iterator</span></tt> specialization models the
|
||||||
by <tt class="literal"><span class="pre">Incrementable</span></tt>.</p>
|
same iterator traversal concepts modeled by <tt class="literal"><span class="pre">Incrementable</span></tt>.</p>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>[<em>Note:</em> implementers are encouraged to provide an implementation of</dt>
|
<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 avoid overflows in
|
<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
|
||||||
the cases when the <tt class="literal"><span class="pre">Incrementable</span></tt> type is a numeric type.]</dd>
|
the cases when the <tt class="literal"><span class="pre">Incrementable</span></tt> type is a numeric type.]</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="counting-iterator-requirements">
|
<div class="section" id="counting-iterator-requirements">
|
||||||
<h1><a class="toc-backref" href="#id3" name="counting-iterator-requirements"><tt class="literal"><span class="pre">counting_iterator</span></tt> requirements</a></h1>
|
<h1><a class="toc-backref" href="#id3" name="counting-iterator-requirements"><tt class="literal"><span class="pre">counting_iterator</span></tt> requirements</a></h1>
|
||||||
<p><tt class="literal"><span class="pre">Incrementable</span></tt> must be Default Constructible, Copy
|
<p>The <tt class="literal"><span class="pre">Incrementable</span></tt> argument shall be Copy Constructible and Assignable.</p>
|
||||||
Constructible, and Assignable.</p>
|
|
||||||
<p>If <tt class="literal"><span class="pre">iterator_category</span></tt> is convertible to <tt class="literal"><span class="pre">forward_iterator_tag</span></tt>
|
<p>If <tt class="literal"><span class="pre">iterator_category</span></tt> is convertible to <tt class="literal"><span class="pre">forward_iterator_tag</span></tt>
|
||||||
or <tt class="literal"><span class="pre">forward_traversal_tag</span></tt>, the following must be well-formed:</p>
|
or <tt class="literal"><span class="pre">forward_traversal_tag</span></tt>, the following must be well-formed:</p>
|
||||||
<pre class="literal-block">
|
<pre class="literal-block">
|
||||||
@ -136,7 +135,9 @@ i < 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>
|
<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
|
<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. 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.</p>
|
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>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="counting-iterator-operations">
|
<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>
|
<h1><a class="toc-backref" href="#id5" name="counting-iterator-operations"><tt class="literal"><span class="pre">counting_iterator</span></tt> operations</a></h1>
|
||||||
@ -148,6 +149,8 @@ operations.</p>
|
|||||||
<col class="field-name" />
|
<col class="field-name" />
|
||||||
<col class="field-body" />
|
<col class="field-body" />
|
||||||
<tbody valign="top">
|
<tbody valign="top">
|
||||||
|
<tr class="field"><th class="field-name">Requires:</th><td class="field-body"><tt class="literal"><span class="pre">Incrementable</span></tt> is Default Constructible.</td>
|
||||||
|
</tr>
|
||||||
<tr class="field"><th class="field-name">Effects:</th><td class="field-body">Default construct the member <tt class="literal"><span class="pre">m_inc</span></tt>.</td>
|
<tr class="field"><th class="field-name">Effects:</th><td class="field-body">Default construct the member <tt class="literal"><span class="pre">m_inc</span></tt>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -261,7 +264,7 @@ indirectly printing out the numbers from 0 to 7
|
|||||||
<hr class="footer" />
|
<hr class="footer" />
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<a class="reference" href="counting_iterator.rst">View document source</a>.
|
<a class="reference" href="counting_iterator.rst">View document source</a>.
|
||||||
Generated on: 2004-01-13 13:15 UTC.
|
Generated on: 2004-01-13 14:10 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.
|
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>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
@ -32,21 +32,20 @@ type. Otherwise ``difference_type`` is ``Difference``.
|
|||||||
|
|
||||||
If ``CategoryOrTraversal`` is not ``use_default`` then the member
|
If ``CategoryOrTraversal`` is not ``use_default`` then the member
|
||||||
``iterator_category`` is ``CategoryOrTraversal``. Otherwise, if
|
``iterator_category`` is ``CategoryOrTraversal``. Otherwise, if
|
||||||
``Incrementable`` is a numberic type ``iterator_category`` is a
|
``numeric_limits<Incrementable>::is_specialized``, then
|
||||||
type convertible to ``random_access_iterator_tag``. Otherwise,
|
``iterator_category`` is a type convertible to
|
||||||
``iterator_category`` is unspecified, and the ``counting_iterator``
|
``random_access_iterator_tag``. Otherwise, ``iterator_category`` is
|
||||||
specialization models the same iterator traversal concepts modeled
|
unspecified, and the ``counting_iterator`` specialization models the
|
||||||
by ``Incrementable``.
|
same iterator traversal concepts modeled by ``Incrementable``.
|
||||||
|
|
||||||
[*Note:* implementers are encouraged to provide an implementation of
|
[*Note:* implementers are encouraged to provide an implementation of
|
||||||
``operator-`` and a ``difference_type`` that avoid overflows in
|
``operator-`` and a ``difference_type`` that avoids overflows in
|
||||||
the cases when the ``Incrementable`` type is a numeric type.]
|
the cases when the ``Incrementable`` type is a numeric type.]
|
||||||
|
|
||||||
``counting_iterator`` requirements
|
``counting_iterator`` requirements
|
||||||
..................................
|
..................................
|
||||||
|
|
||||||
``Incrementable`` must be Default Constructible, Copy
|
The ``Incrementable`` argument shall be Copy Constructible and Assignable.
|
||||||
Constructible, and Assignable.
|
|
||||||
|
|
||||||
If ``iterator_category`` is convertible to ``forward_iterator_tag``
|
If ``iterator_category`` is convertible to ``forward_iterator_tag``
|
||||||
or ``forward_traversal_tag``, the following must be well-formed::
|
or ``forward_traversal_tag``, the following must be well-formed::
|
||||||
@ -76,7 +75,9 @@ the following must must also be valid::
|
|||||||
|
|
||||||
Specializations of ``counting_iterator`` model Readable Lvalue
|
Specializations of ``counting_iterator`` model Readable Lvalue
|
||||||
Iterator. In addition, they model the concepts corresponding to the
|
Iterator. In addition, they model the concepts corresponding to the
|
||||||
iterator tags to which their ``iterator_category`` is convertible.
|
iterator tags to which their ``iterator_category`` is convertible and
|
||||||
|
also corresponding to ``CategoryOrTraversal`` when
|
||||||
|
``CategoryOrTraversal`` is an iterator tag (and not ``use_default``).
|
||||||
|
|
||||||
|
|
||||||
``counting_iterator`` operations
|
``counting_iterator`` operations
|
||||||
@ -89,6 +90,7 @@ operations.
|
|||||||
|
|
||||||
``counting_iterator();``
|
``counting_iterator();``
|
||||||
|
|
||||||
|
:Requires: ``Incrementable`` is Default Constructible.
|
||||||
:Effects: Default construct the member ``m_inc``.
|
:Effects: Default construct the member ``m_inc``.
|
||||||
|
|
||||||
|
|
||||||
|
@ -2017,7 +2017,8 @@ or else``m_iter == end``. The member <tt class="literal"><span class="pre">m_pre
|
|||||||
<col class="field-name" />
|
<col class="field-name" />
|
||||||
<col class="field-body" />
|
<col class="field-body" />
|
||||||
<tbody valign="top">
|
<tbody valign="top">
|
||||||
<tr class="field"><th class="field-name">Requires:</th><td class="field-body"><tt class="literal"><span class="pre">Predicate</span></tt> must be Default Constructible.</td>
|
<tr class="field"><th class="field-name">Requires:</th><td class="field-body"><tt class="literal"><span class="pre">Predicate</span></tt> must be Default Constructible and
|
||||||
|
<tt class="literal"><span class="pre">Predicate</span></tt> is a class type (not a function pointer).</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">A <tt class="literal"><span class="pre">filter_iterator</span></tt> where <tt class="literal"><span class="pre">m_iter</span></tt> is either
|
<tr class="field"><th class="field-name">Returns:</th><td class="field-body">A <tt class="literal"><span class="pre">filter_iterator</span></tt> where <tt class="literal"><span class="pre">m_iter</span></tt> is either
|
||||||
the first position in the range <tt class="literal"><span class="pre">[x,end)</span></tt> such that <tt class="literal"><span class="pre">m_pred(*m_iter)</span> <span class="pre">==</span> <span class="pre">true</span></tt>
|
the first position in the range <tt class="literal"><span class="pre">[x,end)</span></tt> such that <tt class="literal"><span class="pre">m_pred(*m_iter)</span> <span class="pre">==</span> <span class="pre">true</span></tt>
|
||||||
@ -2131,21 +2132,20 @@ class counting_iterator
|
|||||||
type. Otherwise <tt class="literal"><span class="pre">difference_type</span></tt> is <tt class="literal"><span class="pre">Difference</span></tt>.</p>
|
type. Otherwise <tt class="literal"><span class="pre">difference_type</span></tt> is <tt class="literal"><span class="pre">Difference</span></tt>.</p>
|
||||||
<p>If <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt> is not <tt class="literal"><span class="pre">use_default</span></tt> then the member
|
<p>If <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt> is not <tt class="literal"><span class="pre">use_default</span></tt> then the member
|
||||||
<tt class="literal"><span class="pre">iterator_category</span></tt> is <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt>. Otherwise, if
|
<tt class="literal"><span class="pre">iterator_category</span></tt> is <tt class="literal"><span class="pre">CategoryOrTraversal</span></tt>. Otherwise, if
|
||||||
<tt class="literal"><span class="pre">Incrementable</span></tt> is a numberic type <tt class="literal"><span class="pre">iterator_category</span></tt> is a
|
<tt class="literal"><span class="pre">numeric_limits<Incrementable>::is_specialized</span></tt>, then
|
||||||
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 a type convertible to
|
||||||
<tt class="literal"><span class="pre">iterator_category</span></tt> is unspecified, and the <tt class="literal"><span class="pre">counting_iterator</span></tt>
|
<tt class="literal"><span class="pre">random_access_iterator_tag</span></tt>. Otherwise, <tt class="literal"><span class="pre">iterator_category</span></tt> is
|
||||||
specialization models the same iterator traversal concepts modeled
|
unspecified, and the <tt class="literal"><span class="pre">counting_iterator</span></tt> specialization models the
|
||||||
by <tt class="literal"><span class="pre">Incrementable</span></tt>.</p>
|
same iterator traversal concepts modeled by <tt class="literal"><span class="pre">Incrementable</span></tt>.</p>
|
||||||
<dl>
|
<dl>
|
||||||
<dt>[<em>Note:</em> implementers are encouraged to provide an implementation of</dt>
|
<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 avoid overflows in
|
<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
|
||||||
the cases when the <tt class="literal"><span class="pre">Incrementable</span></tt> type is a numeric type.]</dd>
|
the cases when the <tt class="literal"><span class="pre">Incrementable</span></tt> type is a numeric type.]</dd>
|
||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="counting-iterator-requirements">
|
<div class="section" id="counting-iterator-requirements">
|
||||||
<h4><a class="toc-backref" href="#id63" name="counting-iterator-requirements"><tt class="literal"><span class="pre">counting_iterator</span></tt> requirements</a></h4>
|
<h4><a class="toc-backref" href="#id63" name="counting-iterator-requirements"><tt class="literal"><span class="pre">counting_iterator</span></tt> requirements</a></h4>
|
||||||
<p><tt class="literal"><span class="pre">Incrementable</span></tt> must be Default Constructible, Copy
|
<p>The <tt class="literal"><span class="pre">Incrementable</span></tt> argument shall be Copy Constructible and Assignable.</p>
|
||||||
Constructible, and Assignable.</p>
|
|
||||||
<p>If <tt class="literal"><span class="pre">iterator_category</span></tt> is convertible to <tt class="literal"><span class="pre">forward_iterator_tag</span></tt>
|
<p>If <tt class="literal"><span class="pre">iterator_category</span></tt> is convertible to <tt class="literal"><span class="pre">forward_iterator_tag</span></tt>
|
||||||
or <tt class="literal"><span class="pre">forward_traversal_tag</span></tt>, the following must be well-formed:</p>
|
or <tt class="literal"><span class="pre">forward_traversal_tag</span></tt>, the following must be well-formed:</p>
|
||||||
<pre class="literal-block">
|
<pre class="literal-block">
|
||||||
@ -2173,7 +2173,9 @@ i < 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>
|
<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
|
<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. 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.</p>
|
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>
|
||||||
</div>
|
</div>
|
||||||
<div class="section" id="counting-iterator-operations">
|
<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>
|
<h4><a class="toc-backref" href="#id65" name="counting-iterator-operations"><tt class="literal"><span class="pre">counting_iterator</span></tt> operations</a></h4>
|
||||||
@ -2185,6 +2187,8 @@ operations.</p>
|
|||||||
<col class="field-name" />
|
<col class="field-name" />
|
||||||
<col class="field-body" />
|
<col class="field-body" />
|
||||||
<tbody valign="top">
|
<tbody valign="top">
|
||||||
|
<tr class="field"><th class="field-name">Requires:</th><td class="field-body"><tt class="literal"><span class="pre">Incrementable</span></tt> is Default Constructible.</td>
|
||||||
|
</tr>
|
||||||
<tr class="field"><th class="field-name">Effects:</th><td class="field-body">Default construct the member <tt class="literal"><span class="pre">m_inc</span></tt>.</td>
|
<tr class="field"><th class="field-name">Effects:</th><td class="field-body">Default construct the member <tt class="literal"><span class="pre">m_inc</span></tt>.</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -2343,7 +2347,7 @@ LocalWords: OtherIncrementable Coplien -->
|
|||||||
<hr class="footer" />
|
<hr class="footer" />
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<a class="reference" href="facade-and-adaptor.rst">View document source</a>.
|
<a class="reference" href="facade-and-adaptor.rst">View document source</a>.
|
||||||
Generated on: 2004-01-13 13:48 UTC.
|
Generated on: 2004-01-13 14:10 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.
|
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>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Reference in New Issue
Block a user