Boost logo

Boost :

Subject: Re: [boost] [move] Unifying move emulation code in boost
From: David Abrahams (dave_at_[hidden])
Date: 2009-01-05 12:31:44


on Mon Jan 05 2009, Ion Gaztañaga <igaztanaga-AT-gmail.com> wrote:

> Howard Hinnant wrote:
>> On Jan 4, 2009, at 4:54 PM, Ion Gaztañaga wrote:
>> I think a consolidated move library is a very good idea. Thanks for working on it
>> Ion.
>
> I spoke too fast! a) The header has no move guards b) emulation is not working
> properly when trying to port some Interprocess classes to the new emulation.
>
> Although I add the conversion operator (either manually or by macro) functions
> returning by value don't work sometimes and the private copy constructor is selected
> by the compiler (Visual 7.1). I know little about conversion operators but the
> difference between the old move emulation and the new one is that there is no need for
> a move_return<> type that holds movable-only types. Should the emulation work in these
> cases?
>
> MovableOnly factory();
>
> int main()
> {
> MovableOnly m1(factory());
> MovableOnly m2(MovableOnly(arg));
> return 0;
> }
>
> Maybe I'm doing something wrong but I just gave up after several tries to fix this ;-)

Have you got the code and tests in the sandbox? I will be happy to take
a crack at it.

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

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk