std::move_backward
De cppreference.com
[] |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
<metanoindex/>
<tbody> </tbody>| Dclar dans l'en-tte <algorithm>
|
||
template< class BidirIt1, class BidirIt2 > BidirIt2 move_backward( BidirIt1 first, BidirIt1 last, BidirIt2 d_last ); |
||
Dplace les lments de la gamme
[first, last), une autre fin d_last gamme. Les lments sont dplacs dans l'ordre inverse (le dernier lment est dplac en premier), mais leur ordre relatif est prserv . 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.
You can help to correct and verify the translation. Click here for instructions.
Paramtres
| first, last | - | l'intervalle des lments dplacer
Original: the range of the elements to move The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| d_last | - | fin de la plage de destination. Si
d_last est dans [first, last), std :: move </ span> doit tre utilis la place de std::move_backward . Original: end of the destination range. If d_last is within [first, last), std :: move </ span> must be used instead of std::move_backward. The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| Type requirements | ||
-BidirIt1, BidirIt2 must meet the requirements of BidirectionalIterator.
| ||
Retourne la valeur
Iterator dans la plage de destination, pointant vers le dernier lment dplac .
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.
You can help to correct and verify the translation. Click here for instructions.
Complexit
Exactement
last - first dplacer 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.
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
| This section is incomplete Reason: no example |
Voir aussi
(C++11) |
se dplace d'une gamme d'lments vers un nouvel emplacement Original: moves a range of elements to a new location The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction gnrique) |