|
Boost : |
From: Jonathan Turkanis (technews_at_[hidden])
Date: 2004-11-09 21:18:49
"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 ;-)
> Joe Gottman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk