|
Boost : |
From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-07-06 12:17:43
----- Original Message -----
From: "John E. Potter" <jpotter_at_[hidden]>
To: <boost_at_[hidden]>
Cc: "Matthew Austern" <austern_at_[hidden]>
Sent: Friday, July 06, 2001 12:14 PM
Subject: Re: [boost] Input caching iterator adaptor
>
>
> On Fri, 6 Jul 2001, David Abrahams wrote:
>
> > But whether it increments or not is not in question.
> >
> > The question is, if I dereference an input iterator twice without
> > intervening operations, do must I get the same result?
>
> I understrand that. The question is about iterators. Iterators
> are used in algorithms to iterate over (pseudo)sequences. For
> input iterators, increment must move the iterator and dereference
> must not. Dereferencing an input iterator twice must give the
> same element of the (pseudo)sequence. Whether that element has
> a stable value has nothing to do with the iterator.
>
> Let's ask the same irrelevant question about random access iterator.
It's not quite the same question, since you're not printing the value_type
of the iterator. I understand that in your example the notion of equivalent
sillys is a bit, um, silly though.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk