Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-09-15 06:44:55

From: "Thomas Witt" <witt_at_[hidden]>


> With iterator_adaptor only a ctor taken the base_type is provided. As I
> to show in my code example there is a way to use iterator_adaptor and
> the desired ctor, but I consider this solution a hack. In order to have
> desired ctor(directory_iterator(path const&)) I have made path the base
> All iterator state is moved in the policies object and the base_type
object is
> only used during initialization. After the initialization the base_type
> is just unneccessary ballast.

Why not just store it in the policies object to begin with, and provide an
object factory (which takes a path) as many of the examples do?

    make_directory_iterator(char const* path)
        dir_it(some_base_object(), dir_it_policies(path));

> >
> > If so, I think it'll have to wait for our new iterator_adaptor design
> > hope sometime early November).
> I wasn't trying to say come on guys fix iterator_adaptors. I just think
> is a new use-case that makes making iterator_adaptor derivable a worthy
> I would be very interested in discussing ideas regarding

Jeremy and I (and maybe Steve Cleary) were planning to work on it in off
hours at Santa Cruz. Will you be there?

           David Abrahams * Boost Consulting
dave_at_[hidden] *

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