Boost logo

Boost :

Subject: Re: [boost] [move] New version with move-aware containers library
From: Ion Gaztañaga (igaztanaga_at_[hidden])
Date: 2009-04-16 12:08:34

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?

I tried but the second form ends calling the copy constructor because
rv<Derived> & is upcasted to Derived & and then to Base &. Maybe we
could enable some additional conversion operator to a base class.

> If these were originally just implementation details of another library,
> then they would go in a detail/ directory until they are reviewed and
> accepted. On the other hand, since *these* are simply evolutionary
> modifications of the containers in Interprocess, which /were/ reviewed
> and accepted.
> So this really becomes a question of how to go about breaking an
> existing, accepted library into multiple libraries. And I don't really
> know the answer to that one. I'm open to suggestions.

So am I ;-)

>> If move emulation is considered mature enough, we should also plan
>> when could we port all custom move-emulations present in several boost
>> libraries to the "official" move library.
> Yep.

I think porting should be quite fast. One option is to set a Boost
release as a milestone (Boost 1.40, Boost 1.41?) and fill a bug for
every library with move semantics.



Boost list run by bdawes at, gregod at, cpdaniel at, john at