Boost logo

Boost Users :

Subject: Re: [Boost-users] [Range, Container] range of to-be-moved values ?
From: Thorsten Ottosen (thorsten.ottosen_at_[hidden])
Date: 2014-02-05 13:05:12


On 05-02-2014 17:38, John M. Dlugosz wrote:
> On 2/5/2014 6:07 AM, Thorsten Ottosen wrote:
>> On 05-02-2014 10:49, John M. Dlugosz wrote:
>>> Given a boost::container::vector<C> vec;
>>> I can write vec.push_back(move(value)) for a move-only (non-copyable)
>>> type C, instead of vec.push_back(value) as usual.
>>> But what would I write instead of vec.insert(pos,b,e) where (b,e] is a
>>> range of values?
>>
>> boost::push_front( vec, range )
>>
>> ?
>
> Wouldn't that still try and _copy_ the values from range?

Right. Hopefully get a make_move_range(rng) some day. Trivial to make,
and you can apply such a beast to the second argument above to get what
you want.

regards

Thorsten


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