[#BloombergLP-bslalg-ArrayPrimitives-emplace-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/ArrayPrimitives.adoc[ArrayPrimitives]::emplace
:relfileprefix: ../../../
:mrdocs:

Emplace a newly constructed element, shifting subsequent elements&period;

== Synopses

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

Emplace a newly constructed element, shifting subsequent elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class ALLOCATOR,
    class&period;&period;&period; ARGS&gt;
static
void
xref:BloombergLP/bslalg/ArrayPrimitives/emplace-02.adoc[emplace](
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer toBegin,
    bsl::allocator&lowbar;traits&lt;ALLOCATOR&gt;::pointer toEnd,
    ALLOCATOR allocator,
    ARGS&&&period;&period;&period; arguments);
----

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

Emplace a newly constructed element, shifting subsequent elements&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
template&lt;
    class TARGET&lowbar;TYPE,
    class&period;&period;&period; ARGS&gt;
static
void
xref:BloombergLP/bslalg/ArrayPrimitives/emplace-04.adoc[emplace](
    TARGET&lowbar;TYPE* toBegin,
    TARGET&lowbar;TYPE* toEnd,
    xref:BloombergLP/bslma/Allocator.adoc[bslma::Allocator]* allocator,
    ARGS&&&period;&period;&period; args);
----

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

== Parameters

[cols="1,4"]
|===
| Name| Description
| *toBegin*
| insertion position within the destination array
| *toEnd*
| end of the populated destination range
| *allocator*
| allocator used to supply memory if required
| *arguments*
| constructor arguments forwarded to the new element
| *args*
| constructor arguments forwarded to the new element
|===


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