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:

Can I play, too? :)

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:

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



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