[#BloombergLP-bslalg-ArrayPrimitives-defaultConstruct-03] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ArrayPrimitives.adoc[ArrayPrimitives]::defaultConstruct :relfileprefix: ../../../ :mrdocs: `defaultConstruct` overloads == Synopses Declared in `<bslalg_arrayprimitives.h>` Value‐inititalize the specified `numElements` objects of type `allocator_traits<ALLOCATOR>::value_type` into the uninitialized array beginning at the specified `begin` location, using the specified `allocator` to supply memory (if required). If a constructor throws an exception during this operation, then the destructor is called on any newly constructed elements, leaving the output array in an uninitialized state. The behavior is undefined unless the `begin` refers to space sufficient to hold `numElements`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOCATOR> static void xref:BloombergLP/bslalg/ArrayPrimitives/defaultConstruct-07.adoc[defaultConstruct]( bsl::allocator_traits<ALLOCATOR>::pointer begin, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, ALLOCATOR allocator); ---- [.small]#xref:BloombergLP/bslalg/ArrayPrimitives/defaultConstruct-07.adoc[_» more..._]# Construct each of the elements of an array of the specified `numElements` of the parameterized `TARGET_TYPE` starting at the specified `begin` address by value‐initialization. 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 `TARGET_TYPE` default constructor call. 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 this 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 TARGET_TYPE> static void xref:BloombergLP/bslalg/ArrayPrimitives/defaultConstruct-01.adoc[defaultConstruct]( TARGET_TYPE* begin, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator); ---- [.small]#xref:BloombergLP/bslalg/ArrayPrimitives/defaultConstruct-01.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#