
16 Apr
2009
16 Apr
'09
1:45 a.m.
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. In Christ, Steven Watanabe