Boost logo

Boost :

From: John Maddock (John_Maddock_at_[hidden])
Date: 2001-08-08 06:25:01


>1. If i == j for an input iterator, what, if anything does it say about
the
>relationship between *i and *j. (Given istreambuf_iterator it seems to me
>that *i and *j may be quite unrelated objects.)

*i, and *j, must return the same value, but operator* is also a mutating
operation, so *i != *j.

>2. Are there STL algorithms that take Input Iterators which make crucial
use
>of i == j implies *i and *j 'equivalent' (whatever 'equivalent' means
>here)?

Implicitly yes I think they do - since iterators are passed by value, and
since we rely on the copy-constructor post-condition that i == j if j was
constructed from i.

- John Maddock
http://ourworld.compuserve.com/homepages/john_maddock/


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk