On 20 November 2017 at 15:43, Peter Dimov via Boost
Richard Hodges wrote:
It seems to me that the previous name of cloned_ptr is a better choice.
_value is fine IMO. You can have
vector
v; and then
v.push_back( Circle(10) ); v.push_back( Ellipse(10, 15) ); v.push_back( Square(11) );
I would drop the U* constructor though. It's a remnant of the times this was called a pointer. U&& is all that's needed.
It's unfortunate we have to use -> instead of . but that's what's available.
The pointer constructor is needed in migration paths from class heirarchies with a `Clone()` method. It also allows one to support objects coming from C_APIs. I'd avoid using it, but it does have its uses.
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman /listinfo.cgi/boost