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

`destructiveMoveAndInsert` overloads

== Synopses

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

Destructively move elements while inserting default&hyphen;initialized ones&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
static
void
xref:BloombergLP/bslalg/ArrayPrimitives/destructiveMoveAndInsert-01.adoc[destructiveMoveAndInsert](
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer toBegin,
    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 position,
    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/destructiveMoveAndInsert-01.adoc[_» more&period;&period;&period;_]#

Destructively move elements while inserting default&hyphen;initialized ones&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class TARGET&lowbar;TYPE&gt;
static
void
xref:BloombergLP/bslalg/ArrayPrimitives/destructiveMoveAndInsert-06.adoc[destructiveMoveAndInsert](
    TARGET&lowbar;TYPE* toBegin,
    TARGET&lowbar;TYPE** fromEndPtr,
    TARGET&lowbar;TYPE* fromBegin,
    TARGET&lowbar;TYPE* position,
    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/destructiveMoveAndInsert-06.adoc[_» more&period;&period;&period;_]#

Destructively move elements while inserting copies of a value&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;class ALLOCATOR&gt;
static
void
xref:BloombergLP/bslalg/ArrayPrimitives/destructiveMoveAndInsert-0c1.adoc[destructiveMoveAndInsert](
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer toBegin,
    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 position,
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer fromEnd,
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::value&lowbar;type const& value,
    xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size&lowbar;type] numElements,
    ALLOCATOR allocator);
----

[.small]#xref:BloombergLP/bslalg/ArrayPrimitives/destructiveMoveAndInsert-0c1.adoc[_» more&period;&period;&period;_]#

Destructively move elements while inserting copies of a value&period;


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

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

Destructively move elements while inserting a source range&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class ALLOCATOR,
    class FWD&lowbar;ITER,
    class SENTINEL&gt;
static
void
xref:BloombergLP/bslalg/ArrayPrimitives/destructiveMoveAndInsert-0c9.adoc[destructiveMoveAndInsert](
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer toBegin,
    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 position,
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer fromEnd,
    FWD&lowbar;ITER first,
    SENTINEL last,
    xref:BloombergLP/bslalg/ArrayPrimitives/size_type.adoc[size&lowbar;type] numElements,
    ALLOCATOR allocator);
----

[.small]#xref:BloombergLP/bslalg/ArrayPrimitives/destructiveMoveAndInsert-0c9.adoc[_» more&period;&period;&period;_]#

Destructively move elements while inserting a source range&period;


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

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *toBegin*
| beginning of the uninitialized destination range
| *fromEndPtr*
| loads the end of the remaining valid source range
| *fromBegin*
| beginning of the source range
| *position*
| insertion position within the source range
| *fromEnd*
| end of the source range (one past the last element)
| *numElements*
| number of default&hyphen;initialized elements to insert
| *allocator*
| allocator used to supply memory if required
| *value*
| value copied into each inserted element
| *first*
| beginning of the range of elements to insert
| *last*
| end of the range of elements to insert
|===


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