[#BloombergLP-bslalg-ArrayPrimitives-uninitializedFillN-04] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ArrayPrimitives.adoc[ArrayPrimitives]::uninitializedFillN :relfileprefix: ../../../ :mrdocs: `uninitializedFillN` overloads == Synopses Declared in `<bslalg_arrayprimitives.h>` TBD: improve comment Construct copies of the specified `value` of type given by the `allocator_traits` class template for (template parameter) `ALLOCATOR` into the uninitialized array containing the specified `numElements` starting at the specified `begin` location. The behavior is undefined unless the output array contains at least `numElements` uninitialized elements after `begin`. If a constructor throws an exception during the operation, then the destructor is called on any newly‐constructed elements, leaving the output array in an uninitialized state. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOCATOR> static void xref:BloombergLP/bslalg/ArrayPrimitives/uninitializedFillN-0a.adoc[uninitializedFillN]( bsl::allocator_traits<ALLOCATOR>::pointer begin, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, bsl::allocator_traits<ALLOCATOR>::value_type const& value, ALLOCATOR allocator); ---- [.small]#xref:BloombergLP/bslalg/ArrayPrimitives/uninitializedFillN-0a.adoc[_» more..._]# Construct copies of the specified `value` of the parameterized type `TARGET_TYPE` into the uninitialized array containing the specified `numElements` starting at the specified `begin` address. If the (template parameter) `ALLOCATOR` type is derived from `bslma::Allocator` and `TARGET_TYPE` supports `bslma` allocators, then the specified `allocator` is passed to each invocation of the `TARGET_TYPE` copy constructor. The behavior is undefined unless the output array contains at least `numElements` uninitialized elements after `begin`. If a `TARGET_TYPE` constructor throws an exception during the operation, then the destructor is called on any newly‐constructed elements, leaving the output array in an uninitialized state. Note that the argument order was chosen to maintain compatibility with the existing `bslalg`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TARGET_TYPE> static void xref:BloombergLP/bslalg/ArrayPrimitives/uninitializedFillN-06.adoc[uninitializedFillN]( TARGET_TYPE* begin, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, TARGET_TYPE const& value, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator); ---- [.small]#xref:BloombergLP/bslalg/ArrayPrimitives/uninitializedFillN-06.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#