|
Boost : |
Subject: Re: [boost] [tuple] - Move constructors for Tuple
From: Adam Wulkiewicz (adam.wulkiewicz_at_[hidden])
Date: 2013-02-22 08:01:00
Adam Wulkiewicz wrote:
> paul Fultz wrote:
>>
>> Will something like this compile on C++03 compilers?
>>
>> struct foo
>> {
>> tuple<int> x;
>> };
>>
>> foo a, b;
>> a = b;
>>
>> Otherwise, it should have an option to disable Boost.Move.
>
> It compiles. Why do you think it might not?
>
> I only didn't test the performance of this move-enabled version. The
> option to disable it may be added even if everything compiles.
FYI, I've not only added move ctors to tuples but also move assignments
and they not only work with tuples but also may take tuples::cons or
std::pair. If the compiler don't support rval references the std::pair
is copied. tuples::cons is also fully move-enbled. Check out the test:
https://svn.boost.org/svn/boost/sandbox/tuple-move/libs/tuple/test/tuple_move.cpp
Regards,
Adam
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk