[#BloombergLP-bslalg-ArrayPrimitives-insert-0ab] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ArrayPrimitives.adoc[ArrayPrimitives]::insert :relfileprefix: ../../../ :mrdocs: Insert the specified `numElements` copies of the specified `value` into the array of (template parameter) `TARGET_TYPE` starting at the specified `toBegin` address and ending immediately before the specified `toEnd` address, shifting the elements in the array by `numElements` positions towards larger addresses. The behavior is undefined unless the destination array contains at least `numElements` uninitialized elements after `toEnd`. If a copy constructor or assignment operator for `TARGET_TYPE` throws an exception, then any elements created after `toEnd` are destroyed and the elements in the range `[ toBegin, toEnd )]` will have unspecified, but valid, values. == Synopsis Declared in `<bslalg_arrayprimitives.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TARGET_TYPE> static void insert( TARGET_TYPE* toBegin, TARGET_TYPE* toEnd, TARGET_TYPE const& value, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#