Boost logo

Boost :

Subject: Re: [boost] [iterator] Interest in abstract iterator?
From: Edd Dawson (lists_at_[hidden])
Date: 2010-02-09 17:07:26


On 2/8/2010 3:55 PM, joaquin_at_[hidden] wrote:
> I'm much interested. There's also Adobe any_iterator to draw some
> inspiration from:
>
> http://stlab.adobe.com/classadobe_1_1any__iterator.html

Can I play, too? :)

http://www.mr-edd.co.uk/code/opqit
http://bitbucket.org/edd/opqit/wiki/Home

It's not great, but there's some interesting stuff in there:

* extremely small forward declaration "footprint", great for adding iterators to
classes with a pimpl-ed implementation.
* opaque_iterator<X, tag> convertible to opaque_iterator<const X, tag>
* opaque_iterator<X, tag> convertible to opaque_iterator<X, more_relaxed_tag>

One snag I hit was supporting operator-> when wrapping/type-erasing input
iterators. In particular, have you tried wrapping an
std::istreambuf_iterator<char>? There's some annoying wording in the standard
and I'd be interested to know if you run in to the same problem. More info here,
at the end:

http://bitbucket.org/edd/opqit/wiki/Using_opqit

Anyway, I'd like to see something like this in boost.

Cheers,

Edd


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