
Hi, Krzysztof Czainski wrote:
2014-02-15 1:05 GMT+01:00 Adam Wulkiewicz <adam.wulkiewicz@gmail.com>:
Krzysztof Czainski wrote:
2014-02-14 18:16 GMT+01:00 Lars Viklund <zao@acc.umu.se>:
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 );
Yes, of course this should also be possible. There is already boost::move_iterator in Boost.Move. To be consistent with the standard we should probably also have boost::move() algorithm and a range adaptor. But the naming scheme for Range adaptors is different, the past tense should be used, right? Hence "moved". And operator | could just generate std::pair<boost::move_iterator<It>, boost::move_iterator<It>>. But I'm not sure in which library this code should be placed because this creates an additional dependency. Regards, Adam