|
Boost : |
From: Roland Richter (roland_at_[hidden])
Date: 2004-04-13 08:39:23
Vladimir Prus wrote:
> 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.
What are you missing when using the current Sandbox code?
Bug fixes? (see below)
Documentation? (ahem)
Some other view types? (sitting on my HD)
Or ...?
> 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.
> 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.
> 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?
I tried to call for_each with a filter_view as first argument.
MSVC 7.0, as helpful as ever, told me that
Compiling...
filter_for_each_example.cpp
d:\boost-sandbox\boost\sequence_algo\container_traits.hpp(507) : fatal error
C1507: previous user errors and subsequent error recovery halt further compilation
Build Time 0:03
Wow. I'm afraid I don't have the time to fix that.
- Roland
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk