fixes to iterator_category spec for filter_iterator

[SVN r21660]
This commit is contained in:
Jeremy Siek
2004-01-13 03:20:14 +00:00
parent b52b9325ba
commit 3403cbbae6
3 changed files with 27 additions and 21 deletions

View File

@ -1854,14 +1854,16 @@ class filter_iterator
reference operator*() const;
filter_iterator& operator++();
private:
Predicate m_pred; // exposition
Iterator m_iter; // exposition
Iterator m_end; // exposition
Predicate m_pred; // exposition only
Iterator m_iter; // exposition only
Iterator m_end; // exposition only
};
</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">filter_iterator</span></tt>,
as described in the models section.</p>
<p>If the <tt class="literal"><span class="pre">Iterator</span></tt> argument models Readable Lvalue Iterator and
Forward Traversal Iterator then the <tt class="literal"><span class="pre">iterator_category</span></tt> member is a
type convertible to <tt class="literal"><span class="pre">std::forward_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">std::input_iterator_tag</span></tt>.</p>
</div>
<div class="section" id="filter-iterator-requirements">
<h4><a class="toc-backref" href="#id58" name="filter-iterator-requirements"><tt class="literal"><span class="pre">filter_iterator</span></tt> requirements</a></h4>
@ -2306,7 +2308,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 02:53 UTC.
Generated on: 2004-01-13 03:17 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

@ -86,14 +86,16 @@ class filter_iterator
reference operator*() const;
filter_iterator&amp; operator++();
private:
Predicate m_pred; // exposition
Iterator m_iter; // exposition
Iterator m_end; // exposition
Predicate m_pred; // exposition only
Iterator m_iter; // exposition only
Iterator m_end; // exposition only
};
</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">filter_iterator</span></tt>,
as described in the models section.</p>
<p>If the <tt class="literal"><span class="pre">Iterator</span></tt> argument models Readable Lvalue Iterator and
Forward Traversal Iterator then the <tt class="literal"><span class="pre">iterator_category</span></tt> member is a
type convertible to <tt class="literal"><span class="pre">std::forward_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">std::input_iterator_tag</span></tt>.</p>
</div>
<div class="section" id="filter-iterator-requirements">
<h1><a class="toc-backref" href="#id3" name="filter-iterator-requirements"><tt class="literal"><span class="pre">filter_iterator</span></tt> requirements</a></h1>
@ -384,7 +386,7 @@ int main()
<hr class="footer"/>
<div class="footer">
<a class="reference" href="filter_iterator.rst">View document source</a>.
Generated on: 2004-01-13 02:57 UTC.
Generated on: 2004-01-13 03:17 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

@ -24,15 +24,17 @@
reference operator*() const;
filter_iterator& operator++();
private:
Predicate m_pred; // exposition
Iterator m_iter; // exposition
Iterator m_end; // exposition
Predicate m_pred; // exposition only
Iterator m_iter; // exposition only
Iterator m_end; // exposition only
};
The ``iterator_category`` member is a type convertible to the tags
corresponding to each standard concept modeled by ``filter_iterator``,
as described in the models section.
If the ``Iterator`` argument models Readable Lvalue Iterator and
Forward Traversal Iterator then the ``iterator_category`` member is a
type convertible to ``std::forward_iterator_tag``. Otherwise
``iterator_category`` is a type convertible to
``std::input_iterator_tag``.
@ -157,4 +159,4 @@ operations.
:Effects: Increments ``m_iter`` and then continues to
increment ``m_iter`` until either ``m_iter == m_end``
or ``m_pred(*m_iter) == true``.
:Returns: ``*this``
:Returns: ``*this``