[Iterators] Filtering and conversion

Hi there,
I'm playing with the iterators library at the moment. Say I have a
std::vector

Ruediger Berlich wrote:
The filter_iterator already does part of what I'd want here, but cannot help with the conversion part.
I'm not asking for a solution to the above problem, just whether you think this can be done at all. I had the impression that the iterators library assumes that the types of the sequence being iterated over and the type being returned are identical.
I don't know if this helps. But the serialization library has a section called dataflow iterators. It's really about composition of iterators. So you can a) start with an original sequence o_i a) make a derivation from transform iterator - call it t_i b) make a deriveration from filter iterator - call it f-i c) make a composition of the two with - f-i(t_i(o_i). This composite returns a the original sequence filtered and transformed. It's all done at compile time so when you compile for release - the final result is very fast. Robert Ramey
participants (2)
-
Robert Ramey
-
Ruediger Berlich