
17 Apr
2009
17 Apr
'09
6:07 p.m.
on Wed Apr 15 2009, Steven Watanabe <watanabesj-AT-gmail.com> wrote:
AMDG
David Abrahams wrote:
Here's one thing I don't love:
Derived(BOOST_RV_REF(Derived) x) // Move ctor : Base(boost::move(static_cast<Base&>(x))), mem_(boost::move(x.mem_)) { }
is there a way to get rid of the static_cast and make
Derived(BOOST_RV_REF(Derived) x) // Move ctor : Base(boost::move(x)), mem_(boost::move(x.mem_)) { }
work?
FWIW, I always write copy constructors using the cast, after having been bitten by templated base class constructors a few times.
Hmm, good point. -- Dave Abrahams BoostPro Computing http://www.boostpro.com