[#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 `&lt;bslalg&lowbar;arrayprimitives&period;h&gt;`

TBD&colon; improve comment Move the elements of type given by the `allocator&lowbar;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&period; Keep the iterator at the specified `fromEndPtr` address pointing to the end of the range as the elements from `&lsqb; fromBegin, fromEnd )&rsqb;` are moved from source to destination&period; 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&period; If a copy constructor or assignment operator for `TARGET&lowbar;TYPE` throws an exception, then any elements created after `toEnd` are destroyed, the elements in the ranges `&lsqb; toBegin, toEnd)&rsqb;` and `&lsqb; fromBegin, &ast;fromEndPtr )&rsqb;` will have unspecified, but valid, values, and the elements in `&lsqb; &ast;fromEndPtr, fromEnd )&rsqb;` will be destroyed&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
static
void
xref:BloombergLP/bslalg/ArrayPrimitives/moveInsert-00.adoc[moveInsert](
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer toBegin,
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer toEnd,
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer* fromEndPtr,
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer fromBegin,
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer fromEnd,
    xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size&lowbar;type] numElements,
    ALLOCATOR allocator);
----

[.small]#xref:BloombergLP/bslalg/ArrayPrimitives/moveInsert-00.adoc[_» more&period;&period;&period;_]#

Move the elements of the (template parameter) `TARGET&lowbar;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&period; Keep the iterator at the specified `fromEndPtr` address pointing to the end of the range as the elements from `&lsqb; fromBegin, fromEnd )&rsqb;` are moved from source to destination&period; 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&period; If a copy constructor or assignment operator for `TARGET&lowbar;TYPE` throws an exception, then any elements created after `toEnd` are destroyed, the elements in the ranges `&lsqb; toBegin, toEnd)&rsqb;` and `&lsqb; fromBegin, &ast;fromEndPtr )&rsqb;` will have unspecified, but valid, values, and the elements in `&lsqb; &ast;fromEndPtr, fromEnd )&rsqb;` will be destroyed&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TARGET&lowbar;TYPE&gt;
static
void
xref:BloombergLP/bslalg/ArrayPrimitives/moveInsert-043.adoc[moveInsert](
    TARGET&lowbar;TYPE* toBegin,
    TARGET&lowbar;TYPE* toEnd,
    TARGET&lowbar;TYPE** fromEndPtr,
    TARGET&lowbar;TYPE* fromBegin,
    TARGET&lowbar;TYPE* fromEnd,
    xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size&lowbar;type] numElements,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator);
----

[.small]#xref:BloombergLP/bslalg/ArrayPrimitives/moveInsert-043.adoc[_» more&period;&period;&period;_]#


[.small]#Created with https://www.mrdocs.com[MrDocs]#
