[#BloombergLP-bslalg-ArrayPrimitives-destructiveMoveAndInsert-03] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ArrayPrimitives.adoc[ArrayPrimitives]::destructiveMoveAndInsert :relfileprefix: ../../../ :mrdocs: Move the elements of the parameterized `TARGET_TYPE` in the array starting at the specified `fromBegin` address and ending immediately before the specified `fromEnd` address into an uninitialized array of `TARGET_TYPE` at the specified `toBegin` address, inserting at the specified `position` (after translating from `fromBegin` to `toBegin`) the specified `numElements` copies of the specified `value`. Keep the pointer at the specified `fromEndPtr` address pointing to the first uninitialized element in '[ fromBegin,] fromEnd)' as the elements are moved from source to destination. The behavior is undefined unless `fromBegin <= position <= fromEnd` and the destination array contains at least `(fromEnd ‐ fromBegin) + numElements` uninitialized elements. If a copy constructor or assignment operator for `TARGET_TYPE` throws an exception, then any elements created in the output array are destroyed and the elements in the range `[ fromBegin, *fromEndPtr )]` 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 destructiveMoveAndInsert( TARGET_TYPE* toBegin, TARGET_TYPE** fromEndPtr, TARGET_TYPE* fromBegin, TARGET_TYPE* position, TARGET_TYPE* fromEnd, 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]#