[#BloombergLP-bslalg-ArrayPrimitives-insert-0f] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ArrayPrimitives.adoc[ArrayPrimitives]::insert :relfileprefix: ../../../ :mrdocs: TBD: improve comment Insert the specified `numElements` from the range starting at the specified `fromBegin` of (template parameter) `FWD_ITER` type (or template parameter `SOURCE_TYPE *`) and ending immediately before the specified `fromEnd` sentinels or iterators of (template parameter) `SENTINEL` type (or template parameter `SOURCE_TYPE *`), into the array of elements of type given by the `allocator_traits` class template for (template parameter) `ALLOCATOR`, starting at the specified `toBegin` address, shifting forward the elements in the array by `numElements` positions. The behavior is undefined unless the destination array contains `numElements` uninitialized elements after `toEnd`, `numElements` is the distance between `fromBegin` and `fromEnd`, and the input array and the destination array do not overlap. If a copy constructor or assignment operator throws an exception, then any elements created after `toEnd` are destroyed and the elements in the range `[ toBegin, toEnd )]` will have valid but unspecified values. == Synopsis Declared in `<bslalg_arrayprimitives.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template< class ALLOCATOR, class FWD_ITER, class SENTINEL> static void insert( bsl::allocator_traits<ALLOCATOR>::pointer toBegin, bsl::allocator_traits<ALLOCATOR>::pointer toEnd, FWD_ITER fromBegin, SENTINEL fromEnd, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, ALLOCATOR allocator); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#