Boost logo

Boost Users :

Subject: Re: [Boost-users] [Signals\Signals2] Move semantics
From: Dave Abrahams (dave_at_[hidden])
Date: 2011-08-27 16:23:34


on Sat Aug 27 2011, Szymon Gatner <szymon.gatner-AT-gmail.com> wrote:

> 2011/8/17 Frank Mori Hess <fmhess_at_[hidden]>:
>>
>> I have some rather indefinite plans to add move support, at least when
>> compiling in c++0x mode. A swap function for signals2::signal() could be
>> added to make a poor man's move possible for non c++0x code.  I'm not sure
>> I want to bother with move emulation.
>
> Making things movable is super easy with boost.move and it would be very
> useful feature imho. Using swap() for moving is preferred way to implement
> move ctor/assignement anyway no matter how rvalues are implemented
> (if it is actual support or emulation mode).

No, it's the easiest way to get move assignment semantically correct,
but not "the preferred way." At least, it's not universally preferred.
See http://cpp-next.com/archive/2009/09/your-next-assignment/

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net