Boost logo

Boost :

Subject: [boost] [move] [range] move algorithm (was: interest: the pass-by-value...)
From: Krzysztof Czainski (1czajnik_at_[hidden])
Date: 2014-02-15 05:05:16


2014-02-15 1:05 GMT+01:00 Adam Wulkiewicz <adam.wulkiewicz_at_[hidden]>:

> Hi,
>
> Krzysztof Czainski wrote:
>
>> 2014-02-14 18:16 GMT+01:00 Lars Viklund <zao_at_[hidden]>:
>>
>> On Fri, Feb 14, 2014 at 05:52:53PM +0100, Krzysztof Czainski wrote:
>>>
>>>> - a protocol for explicitly stating in code, where a copy is to be made
>>>> (boost::copy()), which compliments the protocol for explicitly stating
>>>> in
>>>>
>>> Note that boost::copy already exists as the widely used Range-based
>>> complement of std::copy algorithm.
>>>
>>> I just want to get this out of the way so people can focus on the actual
>>> proposal and not parrot this over and over again.
>>>
>>> Good point, thanks Lars.
>>
>> Note, that an algorithm boost::move also exists:
>> http://www.boost.org/doc/libs/1_55_0/doc/html/move/move_algorithms.html
>> And I'm not sure how a Range-based complement to the move algorithm could
>> look like, but it may also turn out useful.
>>
>
> Probably like this:
> boost::move(range, out_it) ;
>
> Regards,
> Adam

Hmm, how about:
boost::copy( range | movable, out_it );

Regards,
Kris


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