Boost logo

Boost :

From: Dave Abrahams (abrahams_at_[hidden])
Date: 2000-03-04 17:38:04


on 3/4/00 7:16 AM, John Maddock at John_Maddock_at_[hidden] wrote:

> 4) To implement object factories - using either model (1) or (2) above.
> With respect to object factories I would favour Dave's template member
> functions for create - note that this is a superset of the copy constructor
> approach - it may also be *much* more effecient than relying on a copy
> constructor alone. I don't think it matters that its limited to maybe
> 0,1,2 or 3 arguments, if the limitation proves too much one can always
> revert to your approach and pass a temporary as a single parameter.

I am of the same mind here. One concern of mine is that too much of the C++
standard library has sacrificed convenience for generality, with the result
that there are no simple, convenient, and _common_ idioms for many simple,
common tasks. I suggested parallel approaches so that the the odd
11-argument constructor could be accomodated using the functor approach, but
everyone else could use the pool more naturally.

-Dave


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