Boost logo

Boost :

Subject: Re: [boost] [gil::io] Feedback for scanline_read_iterator
From: Christian Henning (chhenning_at_[hidden])
Date: 2013-02-20 10:14:52


Hi Jeff,

>>
>> I had a quick look, and I immediately noticed that you (still, I guess?)
> are incrementing the _pos member upon dereferencing the first time...is
> there some reason you don't increment it unconditionally in operator++? I'm
> guessing the end result is the same, given the pair of boolean flags
> encoding the state, but it's a "code surprise", which increases the
> cognitive overhead to read it :)
>>
>
> Oh, and after thinking about this a little, effectively incrementing your
> position within operator* will make operator== behave strangely :/
>

I don't remember why I was thinking that increasing the pos inside the
operator* was a good idea. I have to sit down at home tonight or
tomorrow and go over my tests again.

Will let you know when I have the next version.

Thanks again for your insight,
Christian


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