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-21 21:36:02

On Thu, Feb 21, 2013 at 6:22 PM, Christian Henning <chhenning_at_[hidden]>wrote:

> Hi Michael,

> > Note also that I think the requirement on InputIterator concept that
> > Postincrement and dereference (*i++) be valid forces lazy evaluation. If
> you
> > did eager reading/skipping somehow in increment you'd break that
> expression.
> Yes, the postincrement operator is missing. I'll have to look up how
> it's usually implemented.
> >
> > Here is a sketch of a possible implementation.
> >
> >
> I see you're using iterator_facade. I was a little afraid of using it
> since I have never used it before.

If you use iterator_facade, you wouldn't have to worry about defining the
post-increment operator :)

I don't think iterator_facade is difficult to read up on, it's just using
CRTP to define some of the more boilerplate functions of an iterator in
terms of others, which you define. E.g., the post-increment operator is
implemented in terms of the pre-increment operator, the latter of which you
define. operator!= is defined in terms of operator== for you as well.

- Jeff

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