From: David Abrahams (david.abrahams_at_[hidden])
Date: 2001-07-06 09:30:11
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? IOW, something like
template <class InputIterator>
void f(InputIterator i)
typedef typename std::iterator_traits<InputIterator>::value_type v;
v x1 = *i;
v x2 = *i;
assert(x1 == x2); // actually need to say "equivalent" without ==
----- Original Message -----
From: "John E. Potter" <jpotter_at_[hidden]>
Cc: "Matthew Austern" <austern_at_[hidden]>
Sent: Friday, July 06, 2001 10:05 AM
Subject: Re: [boost] Input caching iterator adaptor
> On Sat, 30 Jun 2001, David Abrahams wrote:
> > I understand the problem now. I think this warrants a new LWG issue:
> > "is the result of dereferencing an input iterator stable?"
> Here is my usual response to this question.
> Std::distance is defined for input iterator. It does not dereference.
> Conclusion: dereference does not increment.
> Info: http://www.boost.org Unsubscribe:
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk