Espaces de noms
Variantes

std::copy, std::copy_if

De cppreference.com

<metanoindex/>

 
 
Bibliothèque d'algorithmes
Fonctions
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Non-modification de la séquence des opérations
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.
Modification de la séquence des opérations
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.
Des opérations de partitionnement
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.
Opérations de tri (sur les gammes triés)
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.
is_sorted (C++11)
is_sorted_until (C++11)
sort
Opérations binaires de recherche (sur les gammes triés)
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.
Définir les opérations (sur les gammes triés)
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.
Opérations Heap
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.
Minimum / maximum de fonctionnement
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.
Opérations numériques
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.
Bibliothèque C
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.
 
<tbody> </tbody>
Déclaré dans l'en-tête <algorithm>
template< class InputIt, class OutputIt > OutputIt copy( InputIt first, InputIt last, OutputIt d_first );
(1)
template< class InputIt, class OutputIt, class UnaryPredicate > OutputIt copy_if( InputIt first, InputIt last, OutputIt d_first, UnaryPredicate pred );
(2) (depuis C++11)
Copier les éléments de la gamme, défini par [first, last), dans un autre intervalle au début d_first. La deuxième fonction ne copie que les éléments pour lesquels le prédicat renvoie pred true .
Original:
Copies the elements in the range, defined by [first, last), to another range beginning at d_first. The second function only copies the elements for which the predicate pred returns true.
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'éventail des éléments à copier
Original:
the range of elements to copy
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
d_first -
le début de la plage de destination. Si d_first est dans [first, last), std::copy_backward doit être utilisé à la place de std::copy .
Original:
the beginning of the destination range. If d_first is within [first, last), std::copy_backward must be used instead of std::copy.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
pred - prédicat unéaire qui retourne ​true
pour les éléments requis
Original:
for the required elements
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
.

L'expression pred(v) doit pouvoir être convertie à bool pour tout argument v de type (possiblement const) VT, où VT est le type de valeur de InputIt, inconditionellement de value category, et ne doit pas modifier v. Ainsi, un type-paramètre VT&n'est pas permis ainsi que pour VT sauf pour VT un déplacement est équivalent à une copie (depuis C++11). ​

Type requirements
-
InputIt must meet the requirements of InputIterator.
-
OutputIt must meet the requirements of OutputIterator.

Retourne la valeur

Itérateur de sortie de l'élément dans la zone de destination, une après le dernier élément copié .
Original:
Output iterator to the element in the destination range, one past the last element copied.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Complexité

1)

Exactement last - first missions
Original:
Exactly last - first assignments
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

2)

Exactement last - first applications du prédicat
Original:
Exactly last - first applications of the predicate
The text has been machine-translated via