Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2006-07-06 06:46:58

"Robert Ramey" <ramey_at_[hidden]> writes:

> David Abrahams wrote:
>> "Robert Ramey" <ramey_at_[hidden]> writes:
>> How are these different from many of the iterators provided by
>>, particularly transform_iterator?
> 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

> 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

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