Subject: [boost] [move] unique_ptr: problems with move-assign constructor when used with base/derived classes in C++03
From: Adam Romanek (romanek.adam_at_[hidden])
Date: 2015-03-05 06:17:53
There is a problem with move-assignment constructor in
boost::movelib::unique_ptr when used with a pair of base/derived classes
in C++98/03 mode  (uncomment the code to see the compiler error).
Is it a known issue? Or a limitation of the emulation?
I discovered the issue when I wanted to use boost::movelib::make_shared
in an answer to a question on StackOverflow , i.e.
Where the return value is boost::movelib::unique_ptr<Base>, but
unfortunately because of this issue, in C++03 we need to use:
return unique_ptr<Base> x(new Derived());
I can create a ticket if that is desired.
Nevertheles, thanks for boost::movelib::unique_ptr anyway!
BTW, note how the appearance of boost::movelib::unique_ptr makes the
most voted answer on the question  invalid. This is where my answer
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk