std::uninitialized_fill
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. |
| Defined in header <memory>
|
||
| template< class ForwardIt, class T > void uninitialized_fill( ForwardIt first, ForwardIt last, const T& value ) |
||
Copia la
value valor dado a un área de memoria no inicializada, definido por el rango [first, last). Los elementos en el área sin inicializar se construyen utilizando constructor de copia .Original:
Copies the given value
value to an uninitialized memory area, defined by the range [first, last). 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.
Contenido |
[editar] Parámetros
| first, last | - | la gama de los elementos a inicializar
Original: 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. |
| value | - | el valor para la construcción de los elementos con
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.
| ||
[editar] Valor de retorno
(Ninguno)
Original:
(none)
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.
[editar] Complejidad
Lineal en la distancia entre
first y lastOriginal:
Linear in the distance between
first and lastThe 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.
[editar] Posible implementación
template<class ForwardIt, class T> void uninitialized_fill(ForwardIt first, ForwardIt last, const T& value) { typedef typename std::iterator_traits<ForwardIt>::value_type Value; for (; first != last; ++first) { ::new (static_cast<void*>(&*first)) Value(value); } } |
[editar] Ejemplo
| This section is incomplete Reason: no example |
[editar] Ver también
| copia un objeto a una zona de memoria no inicializada 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. (función de plantilla) | |

