
On 2/8/2010 3:55 PM, joaquin@tid.es wrote:
I'm much interested. There's also Adobe any_iterator to draw some inspiration from:
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