Boost C++ Libraries 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 an old version of Boost. Click here to view this page for the latest version.

Function template move_backward



// In header: <boost/move/algo/move.hpp>

template<typename I, typename O> O move_backward(I f, I l, O result);


Effects: Moves elements in the range [first,last) into the range [result - (last-first),result) starting from last - 1 and proceeding to first. For each positive integer n <= (last - first), performs *(result - n) = boost::move(*(last - n)).

Requires: result shall not be in the range [first,last).

Returns: result - (last - first).

Complexity: Exactly last - first assignments.