Boost logo

Boost :

Subject: Re: [boost] [gil::io] Feedback for scanline_read_iterator
From: Jeffrey Lee Hellrung, Jr. (jeffrey.hellrung_at_[hidden])
Date: 2013-02-18 20:49:12


On Mon, Feb 18, 2013 at 5:23 PM, Christian Henning <chhenning_at_[hidden]>wrote:

> On Mon, Feb 18, 2013 at 8:13 PM, Mateusz Loskot <mateusz_at_[hidden]>
> wrote:
> > AFAIU, the proposal is to support equivalent to this:
> >
> > scanline_read_iterator it =...
> > std::advance (it, 7); // no I/O performed
> > auto& buf = *it; // fetch 7th scanline data now
> >
>
> Ok, I just need to increase the position inside operator++. But this
> brings up an interesting point. What would be the difference_type of a
> scanline_read_iterator?
>

_pos is an int (presently), but I'm guessing it can only take nonnegative
values (other than the sentinel -1 value)? If so, int as the difference
type should be sufficient, right?

- Jeff


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