[#BloombergLP-bdlc-PackedIntArray-08-insert-0b] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/PackedIntArray-08.adoc[PackedIntArray<int>]::insert :relfileprefix: ../../../ :mrdocs: `insert` overloads == Synopses Declared in `<bdlc_packedintarray.h>` Insert into this array, at the specified `dst`, an element having the specified `value`, shifting any elements originally at or above `dst` up by one. Return an iterator to the newly inserted element. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlc/PackedIntArray-08/const_iterator.adoc[const_iterator] xref:BloombergLP/bdlc/PackedIntArray-08/insert-05.adoc[insert]( xref:BloombergLP/bdlc/PackedIntArray-08/const_iterator.adoc[const_iterator] dst, int value); ---- [.small]#xref:BloombergLP/bdlc/PackedIntArray-08/insert-05.adoc[_» more..._]# Insert into this array, at the specified `dstIndex`, an element having the specified `value`, shifting any elements originally at or above `dstIndex` up by one. The behavior is undefined unless `dstIndex <= length()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/bdlc/PackedIntArray-08/insert-0d.adoc[insert]( std::size_t dstIndex, int value); ---- [.small]#xref:BloombergLP/bdlc/PackedIntArray-08/insert-0d.adoc[_» more..._]# Insert into this array, at the specified `dstIndex`, the sequence of values represented by the specified `srcArray`, shifting any elements originally at or above `dstIndex` up by `srcArray.length()` indices higher. The behavior is undefined unless `dstIndex <= length()`. Note that if this array and `srcArray` are the same, the behavior is as if a copy of `srcArray` were passed. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/bdlc/PackedIntArray-08/insert-03.adoc[insert]( std::size_t dstIndex, xref:BloombergLP/bdlc/PackedIntArray-0b.adoc[PackedIntArray<int>] const& srcArray); ---- [.small]#xref:BloombergLP/bdlc/PackedIntArray-08/insert-03.adoc[_» more..._]# Insert into this array, at the specified `dstIndex`, the specified `numElements` values in the specified `srcArray` starting at the specified `srcIndex`. Elements greater than or equal to `dstIndex` are shifted up `numElements` positions. The behavior is undefined unless `dstIndex <= length()` and `srcIndex + numElements <= srcArray.length()`. Note that if this array and `srcArray` are the same, the behavior is as if a copy of `srcArray` were passed. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/bdlc/PackedIntArray-08/insert-0a.adoc[insert]( std::size_t dstIndex, xref:BloombergLP/bdlc/PackedIntArray-0b.adoc[PackedIntArray<int>] const& srcArray, std::size_t srcIndex, std::size_t numElements); ---- [.small]#xref:BloombergLP/bdlc/PackedIntArray-08/insert-0a.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#