[#BloombergLP-bdlc-BitArray-insert-08]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/BitArray.adoc[BitArray]::insert
:relfileprefix: ../../../
:mrdocs:

`insert` overloads

== Synopses

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

Insert into this array at the specified `dstIndex` the specified `value`&period; All values with indices at or above `dstIndex` in this array are shifted up by one bit position&period; The behavior is undefined unless `dstIndex &lt;&equals; length()`&period;


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

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

Insert into this array, beginning at the specified `dstIndex`, the values from the specified `srcArray`&period; All values with indices at or above `dstIndex` in this array are shifted up by `srcArray&period;length()` bit positions&period; The behavior is undefined unless `dstIndex &lt;&equals; length()`&period;


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

[.small]#xref:BloombergLP/bdlc/BitArray/insert-06e.adoc[_» more&period;&period;&period;_]#

Insert into this array at the specified `dstIndex` the specified `numBits` having the specified `value`&period; All values with indices at or above `dstIndex` in this array are shifted up by `numBits` bit positions&period; The behavior is undefined unless `dstIndex &lt;&equals; length()`&period;


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

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

Insert into this array, beginning at the specified `dstIndex`, the specified `numBits` from the specified `srcArray` beginning at the specified `srcIndex`&period; All values with initial indices at or above `dstIndex` are shifted up by `numBits` positions&period; The behavior is undefined unless `dstIndex &lt;&equals; length()` and `srcIndex &plus; numBits &lt;&equals; srcArray&period;length()`&period;


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

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


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