forked from boostorg/utility
fixed sgi stl links
[SVN r9630]
This commit is contained in:
@ -21,21 +21,21 @@
|
|||||||
|
|
||||||
<H2>
|
<H2>
|
||||||
<A NAME="concept:MultiPassInputIterator"></A>
|
<A NAME="concept:MultiPassInputIterator"></A>
|
||||||
MultiPassInputIterator
|
Multi-Pass Input Iterator
|
||||||
</H2>
|
</H2>
|
||||||
|
|
||||||
This concept is a refinement of <a
|
This concept is a refinement of <a
|
||||||
href="http://www.sgi.com/Technology/STL/InputIterator.html">InputIterator</a>,
|
href="http://www.sgi.com/tech/stl/InputIterator.html">Input Iterator</a>,
|
||||||
adding the requirements that the iterator can be used to make multiple
|
adding the requirements that the iterator can be used to make multiple
|
||||||
passes through a range, and that if <TT>it1 == it2</TT> and
|
passes through a range, and that if <TT>it1 == it2</TT> and
|
||||||
<TT>it1</TT> is dereferenceable then <TT>++it1 == ++it2</TT>. The
|
<TT>it1</TT> is dereferenceable then <TT>++it1 == ++it2</TT>. The
|
||||||
MultiPassInputIterator is very similar to the <a
|
Multi-Pass Input Iterator is very similar to the <a
|
||||||
href="http://www.sgi.com/Technology/STL/ForwardIterator.hmtl">ForwardIterator</a>. The
|
href="http://www.sgi.com/tech/stl/ForwardIterator.hmtl">Forward Iterator</a>. The
|
||||||
only difference is that a <a
|
only difference is that a <a
|
||||||
href="http://www.sgi.com/Technology/STL/ForwardIterator.hmtl">ForwardIterator</a>
|
href="http://www.sgi.com/tech/stl/ForwardIterator.hmtl">Forward Iterator</a>
|
||||||
requires the <TT>reference</TT> type to be <TT>value_type&</TT>, whereas
|
requires the <TT>reference</TT> type to be <TT>value_type&</TT>, whereas
|
||||||
MultiPassInputIterator is like <a
|
MultiPassInputIterator is like <a
|
||||||
href="http://www.sgi.com/Technology/STL/InputIterator.html">InputIterator</a>
|
href="http://www.sgi.com/tech/stl/InputIterator.html">Input Iterator</a>
|
||||||
in that the <TT>reference</TT> type merely has to be convertible to
|
in that the <TT>reference</TT> type merely has to be convertible to
|
||||||
<TT>value_type</TT>.
|
<TT>value_type</TT>.
|
||||||
|
|
||||||
@ -44,29 +44,29 @@ in that the <TT>reference</TT> type merely has to be convertible to
|
|||||||
|
|
||||||
comments by Valentin Bonnard:
|
comments by Valentin Bonnard:
|
||||||
|
|
||||||
<p> I think that introducing MultiPassInputIterator isn't the right
|
<p> I think that introducing Multi-Pass Input Iterator isn't the right
|
||||||
solution. Do you also want to define MultiPassBidirectionnalIterator
|
solution. Do you also want to define Multi-Pass Bidirectionnal Iterator
|
||||||
and MultiPassRandomAccessIterator ? I don't, definitly. It only
|
and Multi-Pass Random Access Iterator ? I don't, definitly. It only
|
||||||
confuses the issue. The problem lies into the existing hierarchy of
|
confuses the issue. The problem lies into the existing hierarchy of
|
||||||
iterators, which mixes movabillity, modifiabillity and lvalue-ness,
|
iterators, which mixes movabillity, modifiabillity and lvalue-ness,
|
||||||
and these are clearly independant.
|
and these are clearly independant.
|
||||||
|
|
||||||
<p> The terms Forward, Bidirectionnal and RandomAccess are about
|
<p> The terms Forward, Bidirectionnal and Random Access are about
|
||||||
movabillity and shouldn't be used to mean anything else. In a
|
movabillity and shouldn't be used to mean anything else. In a
|
||||||
completly orthogonal way, iterators can be immutable, mutable, or
|
completly orthogonal way, iterators can be immutable, mutable, or
|
||||||
neither. Lvalueness of iterators is also orthogonal with
|
neither. Lvalueness of iterators is also orthogonal with
|
||||||
immutabillity. With these clean concepts, your MultiPassInputIterator
|
immutabillity. With these clean concepts, your Multi-Pass Input Iterator
|
||||||
is just called a ForwardIterator.
|
is just called a Forward Iterator.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Other translations are:<br>
|
Other translations are:<br>
|
||||||
std::ForwardIterator -> ForwardIterator & LvalueIterator<br>
|
std::Forward Iterator -> ForwardIterator & Lvalue Iterator<br>
|
||||||
std::BidirectionnalIterator -> BidirectionnalIterator & LvalueIterator<br>
|
std::Bidirectionnal Iterator -> Bidirectionnal Iterator & Lvalue Iterator<br>
|
||||||
std::RandomAccessIterator -> RandomAccessIterator & LvalueIterator<br>
|
std::Random Access Iterator -> Random Access Iterator & Lvalue Iterator<br>
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
Note that in practice the only operation not allowed on my
|
Note that in practice the only operation not allowed on my
|
||||||
ForwardIterator which is allowed on std::ForwardIterator is
|
Forward Iterator which is allowed on std::Forward Iterator is
|
||||||
<tt>&*it</tt>. I think that <tt>&*</tt> is rarely needed in generic code.
|
<tt>&*it</tt>. I think that <tt>&*</tt> is rarely needed in generic code.
|
||||||
|
|
||||||
<p>
|
<p>
|
||||||
@ -75,9 +75,9 @@ reply by Jeremy Siek:
|
|||||||
<p>
|
<p>
|
||||||
The above analysis by Valentin is right on. Of course, there is
|
The above analysis by Valentin is right on. Of course, there is
|
||||||
the problem with backward compatibility. The current STL implementations
|
the problem with backward compatibility. The current STL implementations
|
||||||
are based on the old definition of ForwardIterator. The right course
|
are based on the old definition of Forward Iterator. The right course
|
||||||
of action is to get ForwardIterator, etc. changed in the C++ standard.
|
of action is to get Forward Iterator, etc. changed in the C++ standard.
|
||||||
Once that is done we can drop MultiPassInputIterator.
|
Once that is done we can drop Multi-Pass Input Iterator.
|
||||||
|
|
||||||
|
|
||||||
<br>
|
<br>
|
||||||
|
Reference in New Issue
Block a user