Boost logo

Boost :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2004-04-14 01:34:30


Hi Roland,
> > I'm wondering what's the status of your "views" library, which is now in
> > Boost sandbox?
> >
> > I'm rather interested to use it and see in in Boost, and I have some
> > questions:
> >
> > 1. Do you plan to work on it anytime soon and push it to review?
>
> Given the current backlog of libraries to be reviewed, and my
> inexperience with Boost's review mechanism, I don't have such plans
> right now. On the other hand, every now and then I receive an email
> saying "I'd really like to see the views library in Boost". Well.

Hopefully you'll find some time ;-)

> What are you missing when using the current Sandbox code?

Mostly, library is sandbox which is not yet submitted is perceived as
"unfinished", so I was wondering what's exactly is unfinished. Of course,
there are other issues: like using the library from another Boost libraries
and after all, Boost is more easily available than sandbox, so using a
library in Boost is more convenient.

> > 2. It (specifically filter_iterator) does not work for me (see the
> > attached compile log). Is there any change you'll fix the problems? Will
> > it be OK if I fix the problems?
>
> Should be fixed.

After your second commit I can compile the test just fine. Thanks!

> > 3. I would have expected that there is some common 'view' class which
> > provides definitions for typedefs and functions like 'empty' and that
> > individual views only define methods which really differ, like begin/end.
> > Was this design ever considered.
>
> Yes, I considered that solution.
>
> Take empty(), for instance: some views are empty if (and only if) their
> underlying container is. Others, such as filter_view, might be empty even
> if the underlying container is not empty. What should I do then, make
> empty() virtual (gasp)?
>
> After all, there is not much which views have in common, so I thought it
> was not worth the effort to extract a common base class.

Ok, agrument understood.

> > 4. Together with filter_view, I'd like to have 'filter' function, so that
> > I can do something like:
> >
> > for_each(
> > filter(vertices(g), boost::lambda::bind(out_degree_f, _1, g) == 0),
> > .....);
> >
> > Is it possible add such functions?
>
> I guess you're using for_each from sequence_algo?

Right.

> d:\boost-sandbox\boost\sequence_algo\container_traits.hpp(507) : fatal
> error C1507: previous user errors and subsequent error recovery halt
> further compilation

> Wow. I'm afraid I don't have the time to fix that.

I guess gcc won't crash in this way ;-) What do you think about such functions
in general. I might have the time to play with the idea.

BTW, please find a trivial patch to add some missing typenames. Could it be
applied?

- Volodya




Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk