|
Boost : |
From: Larry Evans (cppljevans_at_[hidden])
Date: 2007-12-17 09:20:04
On 12/17/07 04:22, John Torjo wrote:
> Hi all,
>
> Today starts the formal Fast-Track review of the
> Boost.Functional/Factory library.
[snip]
> What to include in Review Comments
> ==================================
>
[snip]
> * What is your evaluation of the documentation?
Good, however, it should include some hint about how to overcome
the Lvalue constraint on the arguments that's mentioned in the
docs:
a0...aN
argument LValues to a constructor of T
I'd think something like the following:
template
< class Source
>
struct
factory_fwd
: boost::forward_adapter<boost::factory<Source> >
{
factory_fwd(void)
: boost::forward_adapter<boost::factory<Source>
>(boost::factory<Source>())
{}
};
would nicely show how the forward lib can be used to overcome this
constraint.
> * What is your evaluation of the potential usefulness of the
> library?
Very. I'm thinking it could be used as a replacement for Abraham's
new_ as shown in the attachment to:
http://lists.boost.org/Archives/boost/2007/12/131251.php
I think it could also be used for similar factories which, for
example, want to decorate the source object with some hidden features,
e.g. a refcount. The containing smart_ptr would know about that and
somehow retrieve it and avoid the extra overhead of a detached
refcount as in, for example, shared_ptr.
> * Did you try to use the library? With what compiler?
> Did you have any problems?
Compiled factory.cpp and factory_fwd template with gcc-4.1 and had no
problems.
> * How much effort did you put into your evaluation?
> A glance? A quick reading? In-depth study?
Quick reading.
> * Are you knowledgeable about the problem domain?
Not very.
> And finally, every review should answer this question:
>
> * Do you think the library should be accepted as a Boost library?
> Be sure to say this explicitly so that your other comments
> don't obscure your overall opinion.
>
Yes.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk