[#BloombergLP-bslalg-ArrayPrimitives-copyConstruct-0eb] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ArrayPrimitives.adoc[ArrayPrimitives]::copyConstruct :relfileprefix: ../../../ :mrdocs: Copy into an uninitialized array of (the template parameter) `TARGET_TYPE` beginning at the specified `toBegin` address, the elements in the array of `TARGET_TYPE` starting at the specified `fromBegin` address and ending immediately before the specified `fromEnd` 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. 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. == Synopsis Declared in `<bslalg_arrayprimitives.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class TARGET_TYPE, class FWD_ITER, class SENTINEL> static void copyConstruct( TARGET_TYPE* toBegin, FWD_ITER fromBegin, SENTINEL fromEnd, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#