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

`destructiveMove` overloads

== Synopses

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

Move the elements of type `allocator&lowbar;traits&lt;ALLOCATOR&gt;&colon;&colon;value&lowbar;type` in the range beginning at the specified `fromBegin` location and ending immediately before the specified `fromEnd` location into the uninitialized array beginning at the specified `toBegin` location, using the specified `allocator` to supply memory (if required)&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 a constructor throws an exception during this operation, the output array is left in an uninitialized state&period; If a constructor other than the move constructor of a non&hyphen;copy&hyphen;constructible type throws an exception during this operation, the input array is unaffected&semi; otherwise, if the move constructor of a non&hyphen;copy&hyphen;constructible type throws an exception during this operation, the input array is left in a valid but unspecified state&period; The behavior is undefined unless `toBegin` refers to space sufficient to hold `fromEnd &hyphen; fromBegin` elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
static
void
xref:BloombergLP/bslalg/ArrayPrimitives/destructiveMove-07.adoc[destructiveMove](
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer toBegin,
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer fromBegin,
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer fromEnd,
    ALLOCATOR allocator);
----

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

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;


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

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


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