[#BloombergLP-bslalg-ArrayPrimitives-destructiveMove-03]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ArrayPrimitives.adoc[ArrayPrimitives]::destructiveMove
:relfileprefix: ../../../
:mrdocs:

Destructively move elements into an uninitialized array&period;

== Synopsis

Declared in `&lt;bslalg&lowbar;arrayprimitives&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TARGET&lowbar;TYPE&gt;
static
void
destructiveMove(
    TARGET&lowbar;TYPE* toBegin,
    TARGET&lowbar;TYPE* fromBegin,
    TARGET&lowbar;TYPE* fromEnd,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator);
----

== Description

Move the elements of the parameterized `TARGET&lowbar;TYPE` in the array starting at the specified `fromBegin` address and ending immediately before the specified `fromEnd` address into an uninitialized array of `TARGET&lowbar;TYPE` beginning at the specified `toBegin` address&period; On return, the elements in the input range are invalid, i&period;e&period;, their destructors must not be called after this operation returns&period; If the parameterized `ALLOCATOR` type is derived from `bslma&colon;&colon;Allocator` and `TARGET&lowbar;TYPE` supports `bslma` allocators, then the specified `allocator` is used by the objects in their new location&period; If an exception is thrown by a `TARGET&lowbar;TYPE` constructor during the operation, then the output array is left in an uninitialized state and the input elements remain in their original state&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *toBegin*
| beginning of the uninitialized destination range
| *fromBegin*
| beginning of the source range
| *fromEnd*
| end of the source range (one past the last element)
| *allocator*
| allocator used by objects in their new location
|===


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