Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

move_backward

Moves the elements of one iterator to another. The move starts with the last element in a specified range, and ends with the first element in that range.

template<class BidirectionalIterator1, class BidirectionalIterator2>
    BidirectionalIterator2 move_backward(
        BidirectionalIterator1 _First, 
        BidirectionalIterator1 _Last,
        BidirectionalIterator2 _DestEnd
    );

_First

An iterator that indicates the start of a range to move elements from.

_Last

An iterator that indicates the end of a range to move elements from. This element is not moved.

_DestEnd

A bidirectional iterator addressing the position of one past the final element in the destination range.

Returns an iterator that refers to the first element that is not moved.

The template function evaluates *(_DestEnd - N - 1) = move(*(_Last - N - 1))) once for each N in the range [0, _Last - _First), for strictly increasing values of N starting with the lowest value. It then returns _DestEnd - (_Last - _First). If _DestEnd and _First designate regions of storage, _DestEnd must not be in the range [_First, _Last).

move and move_backward are functionally equivalent to using copy and copy_backward with a move iterator.

Header: <algorithm>

Namespace: std

Show:
© 2014 Microsoft