
10 Nov
2004
10 Nov
'04
2:18 a.m.
"Joe Gottman" <jgottman@carolina.rr.com> wrote in message news:cmro5r$o56$1@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