[This is no longer a review comment, simply a follow-up to discussion
arising from review comments.]
On Mon, Sep 10, 2012 at 5:11 PM, Nat Linden
Examples I would like to see include:
- using a recursive generator to emit iterators over a tree structure (possibly wrapped in a Boost iterator facade)
It occurred to me that one could write a generic generator_iterator adapter (somewhat analogous to transform_iterator). This adapter could accept an arbitrary generator, mapping the generator API into the iterator API. Following convention, a default-constructed iterator would represent the end of the sequence. I'd really like for that adapter to be included as part of the Boost.Coroutine library. I'd like to be able to write a generator-function, wrap it in a generator object and wrap that in the adapter to get a forward iterator over the results from that generator-function.