Boost C++ Libraries

...one of the most highly regarded and expertly designed C++ library projects in the world. Herb Sutter and Andrei Alexandrescu, C++ Coding Standards

This is the documentation for a snapshot of the master branch, built from commit c89e626766.
PrevUpHomeNext
move
Description

move a sequence src to a sequence dest. It is also used to convert sequence into other.

Synopsis
template <typename Seq1, typename Seq2>
typename result_of::move<Seq1, Seq2>::type move(Seq1&& src, Seq2& dest);

Table 1.37. Parameters

Parameter

Requirement

Description

src

A model of Forward Sequence, all elements contained in the src sequence should be convertible into the element contained in the dest sequence.

Operation's argument

dest

A model of Forward Sequence, e2 = std::move(e1) is valid expression for each pair of elements e1 of src and e2 of dest.

Operation's argument


Expression Semantics
move(src, dest);

Return type: void

Semantics: e2 = std::move(e1) for each element e1 in src and e2 in dest.

Complexity

Linear, exactly result_of::size<Sequence>::value.

Header
#include <boost/fusion/algorithm/auxiliary/move.hpp>
#include <boost/fusion/include/move.hpp>
Example
vector<int,int> vec(1,2);
list<int,int> ls;
move(std::move(vec), ls);
assert(ls == make_list(1,2));

PrevUpHomeNext