[#BloombergLP-bslalg-ArrayPrimitives-moveInsert-00] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ArrayPrimitives.adoc[ArrayPrimitives]::moveInsert :relfileprefix: ../../../ :mrdocs: TBD: improve comment Move the elements of type given by the `allocator_traits` class template for (template parameter) `ALLOCATOR` in the array starting at the specified `toBegin` location and ending immediately before the specified `toEnd` location by the specified `numElements` positions towards larger addresses, and fill the `numElements` at the `toBegin` location by moving the elements from the array starting at the specified `fromBegin` and ending immediately before the specified `fromEnd` location. Keep the iterator at the specified `fromEndPtr` address pointing to the end of the range as the elements from `[ fromBegin, fromEnd )]` are moved from source to destination. The behavior is undefined unless the destination array contains `numElements` uninitialized elements after `toEnd`, `numElements` is the distance from `fromBegin` to `fromEnd`, and the input and destination arrays do not overlap. If a copy constructor or assignment operator for `TARGET_TYPE` throws an exception, then any elements created after `toEnd` are destroyed, the elements in the ranges `[ toBegin, toEnd)]` and `[ fromBegin, *fromEndPtr )]` will have unspecified, but valid, values, and the elements in `[ *fromEndPtr, fromEnd )]` will be destroyed. == Synopsis Declared in `<bslalg_arrayprimitives.h>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOCATOR> static void moveInsert( bsl::allocator_traits<ALLOCATOR>::pointer toBegin, bsl::allocator_traits<ALLOCATOR>::pointer toEnd, bsl::allocator_traits<ALLOCATOR>::pointer* fromEndPtr, bsl::allocator_traits<ALLOCATOR>::pointer fromBegin, bsl::allocator_traits<ALLOCATOR>::pointer fromEnd, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, ALLOCATOR allocator); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#