std::move_backward — cppreference.com
De cppreference.com
<metanoindex/>
<tbody> </tbody>
| Déclaré dans l'en-tête <algorithm> |
||
|
|
||
Déplace les éléments de la gamme [first, last), à une autre fin à d_last gamme. Les éléments sont déplacés dans l'ordre inverse (le dernier élément est déplacé en premier), mais leur ordre relatif est préservé .
Original:
Moves the elements from the range [first, last), to another range ending at d_last. The elements are moved in reverse order (the last element is moved first), but their relative order is preserved.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Paramètres
| first, last | - | l'intervalle des éléments à déplacer Original: the range of the elements to move The text has been machine-translated via Google Translate. |
| d_last | - | fin de la plage de destination. Si Original: end of the destination range. If The text has been machine-translated via Google Translate. |
| Type requirements | ||
-BidirIt1, BidirIt2 must meet the requirements of BidirectionalIterator.
| ||
Retourne la valeur
Iterator dans la plage de destination, pointant vers le dernier élément déplacé .
Original:
Iterator in the destination range, pointing at the last element moved.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Complexité
Exactement last - first déplacer les affectations .
Original:
Exactly last - first move assignments.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Mise en œuvre possible
template< class BidirIt1, class BidirIt2 > BidirIt2 move_backward(BidirIt1 first, BidirIt1 last, BidirIt2 d_last) { while (first != last) { *(--d_last) = std::move(*(--last)); } return d_last; }
Exemple
Voir aussi
se déplace d'une gamme d'éléments vers un nouvel emplacement Original: moves a range of elements to a new location The text has been machine-translated via Google Translate. (fonction générique) [edit] | |