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
> > did eager reading/skipping somehow in increment you'd break that
> 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.
> > http://codepad.org/9hjn3SpQ
> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk