[#BloombergLP-bslalg-ArrayPrimitives-moveInsert-04d] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ArrayPrimitives.adoc[ArrayPrimitives]::moveInsert :relfileprefix: ../../../ :mrdocs: `moveInsert` overloads == Synopses Declared in `<bslalg_arrayprimitives.h>` 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class ALLOCATOR> static void xref:BloombergLP/bslalg/ArrayPrimitives/moveInsert-00.adoc[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]#xref:BloombergLP/bslalg/ArrayPrimitives/moveInsert-00.adoc[_» more..._]# Move the elements of the (template parameter) `TARGET_TYPE` in the array starting at the specified `toBegin` address and ending immediately before the specified `toEnd` address by the specified `numElements` positions towards larger addresses, and fill the `numElements` at the `toBegin` address by moving the elements from the array starting at the specified `fromBegin` and ending immediately before the specified `fromEnd` address. 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. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- template<class TARGET_TYPE> static void xref:BloombergLP/bslalg/ArrayPrimitives/moveInsert-043.adoc[moveInsert]( TARGET_TYPE* toBegin, TARGET_TYPE* toEnd, TARGET_TYPE** fromEndPtr, TARGET_TYPE* fromBegin, TARGET_TYPE* fromEnd, xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size_type] numElements, xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator); ---- [.small]#xref:BloombergLP/bslalg/ArrayPrimitives/moveInsert-043.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#