Espaços nominais
Variantes
Acções

std::move_backward

Da cppreference.com
< cpp‎ | algorithm

 
 
Biblioteca algoritmo
Funções
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Não modificar operações de seqüência
Original:
Non-modifying sequence operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Modificando operações de seqüência
Original:
Modifying sequence operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Particionamento operações
Original:
Partitioning operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Operações de classificação (em intervalos ordenados)
Original:
Sorting operations (on sorted ranges)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Binários operações de busca (em intervalos ordenados)
Original:
Binary search operations (on sorted ranges)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Definir operações (em intervalos ordenados)
Original:
Set operations (on sorted ranges)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Operações de pilha
Original:
Heap operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Mínimo / máximo de operações
Original:
Minimum/maximum operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Operações numéricas
Original:
Numeric operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
C biblioteca
Original:
C library
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Definido no cabeçalho <algorithm>
template< class BidirIt1, class BidirIt2 >
BidirIt2 move_backward( BidirIt1 first, BidirIt1 last, BidirIt2 d_last );
Move os elementos da [first, last) alcance, para um outro final escala em d_last. Os elementos são movidos em ordem inversa (o último elemento é movido em primeiro lugar), mas a sua ordem relativa é preservada.
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.

Índice

[editar] Parâmetros

first, last -
a gama de elementos para se mover
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 -
final do intervalo de destino. Se d_last está dentro [first, last), NJ std :: movimento </ span> deve ser utilizado em vez de std::move_backward .
Original:
end of the destination range. If d_last is within [first, last), NJ std :: movimento </ span> must be used instead of std::move_backward. </div>
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
</div></div></div></div>
Type requirements
-
BidirIt1, BidirIt2 must meet the requirements of BidirectionalIterator.

[editar] Valor de retorno

Iterator no intervalo de destino, apontando para o último elemento movido.
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.

[editar] Complexidade

Exatamente last - first mover atribuições.
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.

[editar] Possível implementação

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;
}

[editar] Exemplo

[editar] Veja também

(C++11)
move-se de uma série de elementos para uma nova localização
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.

(modelo de função) [edit]

Obtida de "https://pt.cppreference.com/mwiki/index.php?title=cpp/algorithm/move_backward&oldid=19944"