Boost logo

Boost :

Subject: Re: [boost] [algorithm] adjacent_for_each interest?
From: Evgeny Panasyuk (evgeny.panasyuk_at_[hidden])
Date: 2013-02-11 04:18:00

11.02.2013 3:09, Dave Abrahams:

>> In this regard your version at
>> is broken.
>> Because it advertises to work on InputIterator, but it dereferences
>> iterator at same position several times. As the result current
>> implementation is for ForwardIterator.
> That's incorrect. The mental model for InputIterator is an ephemeral
> input stream *with a one-element backing buffer*. You are allowed to
> dereference the same InputIterator multiple times at the same position
> until that iterator or a copy of it is incremented.

Thanks for correction, I should re-phrase my sentence as:
"but it dereferences iterator at same position several times *after
passing to next and/or dereferencing it*" (

Evgeny Panasyuk

Boost list run by bdawes at, gregod at, cpdaniel at, john at