[#BloombergLP-bdlc-CompactedArray-insert-03d]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray]::insert
:relfileprefix: ../../../
:mrdocs:

`insert` overloads

== Synopses

Declared in `&lt;bdlc&lowbar;compactedarray&period;h&gt;`

Insert `value` into this array at the position of `dst`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlc/CompactedArray/const_iterator.adoc[CompactedArray&lt;TYPE&gt;::const&lowbar;iterator]
xref:BloombergLP/bdlc/CompactedArray/insert-03a.adoc[insert](
    xref:BloombergLP/bdlc/CompactedArray/const_iterator.adoc[const&lowbar;iterator] dst,
    TYPE const& value);
----

[.small]#xref:BloombergLP/bdlc/CompactedArray/insert-03a.adoc[_» more&period;&period;&period;_]#

Insert the elements of `srcArray` into this array at `dstIndex`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlc/CompactedArray/insert-05.adoc[insert](
    std::size&lowbar;t dstIndex,
    xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray] const& srcArray);
----

[.small]#xref:BloombergLP/bdlc/CompactedArray/insert-05.adoc[_» more&period;&period;&period;_]#

Insert `value` into this array at the specified `dstIndex`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlc/CompactedArray/insert-08.adoc[insert](
    std::size&lowbar;t dstIndex,
    TYPE const& value);
----

[.small]#xref:BloombergLP/bdlc/CompactedArray/insert-08.adoc[_» more&period;&period;&period;_]#

Insert elements from `srcArray` into this array at `dstIndex`&period;


[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
xref:BloombergLP/bdlc/CompactedArray/insert-0b.adoc[insert](
    std::size&lowbar;t dstIndex,
    xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray] const& srcArray,
    std::size&lowbar;t srcIndex,
    std::size&lowbar;t numElements);
----

[.small]#xref:BloombergLP/bdlc/CompactedArray/insert-0b.adoc[_» more&period;&period;&period;_]#

== Return Value

iterator to the newly inserted element

== Parameters

[cols="1,4"]
|===
| Name| Description
| *dst*
| iterator position at which to insert
| *value*
| value of the inserted element
| *dstIndex*
| index at which to insert
| *srcArray*
| array whose elements are inserted
| *srcIndex*
| first index in `srcArray` to copy from
| *numElements*
| number of elements to insert
|===


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