|
Boost : |
From: Daryle Walker (darylew_at_[hidden])
Date: 2004-11-17 18:05:29
On 11/9/04 9:18 PM, "Jonathan Turkanis" <technews_at_[hidden]> wrote:
> "Joe Gottman" <jgottman_at_[hidden]> wrote in message
> news:cmro5r$o56$1_at_sea.gmane.org...
>> I used base_from_member today for the first time. It got me out of a
>> sticky situation, but I think it could use a few modifications. Since it is
>> designed to be used as a base class but does not have any virtual functions,
>> the copy constructor, assignment operator, and destructor should all be
>> protected.
>
> I seem to remember someone proposing something similar for std::unary_function
> ;-) The argument seems even weaker here: base_from_member is designed for
> private inheritance, so it's hard to see how it can be misused by clients of a
> derived class.
>
> There's one change I'd like to see: the constructors should take rvalue
> references ;-)
But that would prevent lvalue references from ever being used. However,
since we can't explicitly specify the template parameters for a templated
constructor, could reference arguments (of either type) ever be used?
-- Daryle Walker Mac, Internet, and Video Game Junkie darylew AT hotmail DOT com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk