
"Robert Ramey" <ramey@rrsd.com> writes:
David Abrahams wrote:
"Robert Ramey" <ramey@rrsd.com> writes:
How are these different from many of the iterators provided by http://www.boost.org/libs/iterator, particularly transform_iterator?
http://www.boost.org/libs/serialization/doc/index.html describes this.
All the "dataflow iterators" are derived from boost.iterator. For some I derived from transform iterator for others I derived from filter and I forget the rest.
I don't know what you mean by "derived" but if you're referring to regular C++ derivation, that generally doesn't result in a legal iterator class. For example, the result type of operator++ is usually wrong.
Aside from implementing the transforming behavior required for the specific instance, the only real addition is the requirement that all of them have a templated constructor.
Details would be helpful here.
This simple addition made all the difference for me.
This permitted me to compose them to any ressonable depth and sequence with just one (rather long) typedef into a new iterator which can be used just as easily as any other.
The existing iterator adaptors are easily composed, so I'd like to know a little more about what you did, and gained.
I've never been able to convince anyone else of the merit of the approach - but hope springs eternal.
Maybe you never articulated sufficiently clearly what you added to the basics provided by the iterator library, and why. -- Dave Abrahams Boost Consulting www.boost-consulting.com