std::uninitialized_fill_n
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. |
| Déclaré dans l'en-tête <memory>
|
||
| template< class ForwardIt, class Size, class T > void uninitialized_fill_n( ForwardIt first, Size count, const T& value ) |
||
Copie le
value valeur donnée aux éléments count première fois dans une zone mémoire non initialisée début à first. Les éléments de la zone non initialisée sont construites en utilisant constructeur de copie .Original:
Copies the given value
value to the first count elements in an uninitialized memory area beginning at first. The elements in the uninitialized area are constructed using copy constructor.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.
Sommaire |
[modifier] Paramètres
| first | - | le début de l'intervalle des éléments à initialiser
Original: the beginning of the range of the elements to initialize The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| count | - | nombre d'éléments à construire
Original: number of elements to construct The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| value | - | la valeur pour la construction des éléments de
Original: the value to construct the elements with The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. |
| Type requirements | ||
-ForwardIt must meet the requirements of ForwardIterator.
| ||
[modifier] Retourne la valeur
Itérateur à l'élément après le dernier élément copié .
Original:
Iterator to the element 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.
You can help to correct and verify the translation. Click here for instructions.
[modifier] Complexité
Linéaire dans
countOriginal:
Linear in
countThe 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.
[modifier] Mise en œuvre possible
template< class ForwardIt, class Size, class T > void uninitialized_fill_n(ForwardIt first, Size count const T& value) { typedef typename std::iterator_traits<ForwardIt>::value_type Value; for (; count > 0; ++first, --count) { ::new (static_cast<void*>(&*first)) Value(value); } return first; } |
[modifier] Exemple
| This section is incomplete Reason: no example |
[modifier] Voir aussi
| copie un objet dans une zone non initialisée de la mémoire Original: copies an object to an uninitialized area of memory The text has been machine-translated via Google Translate. You can help to correct and verify the translation. Click here for instructions. (fonction générique) | |

