[#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 `<bdlc_compactedarray.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 index position. Return an iterator to the newly inserted element. The behavior is undefined unless `dst` is an iterator over this array. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- xref:BloombergLP/bdlc/CompactedArray/const_iterator.adoc[CompactedArray<TYPE>::const_iterator] xref:BloombergLP/bdlc/CompactedArray/insert-03a.adoc[insert]( xref:BloombergLP/bdlc/CompactedArray/const_iterator.adoc[const_iterator] dst, TYPE const& value); ---- [.small]#xref:BloombergLP/bdlc/CompactedArray/insert-03a.adoc[_» more..._]# Insert into this array, at the specified `dstIndex`, the elements from the specified `srcArray`, shifting any elements originally at or above `dstIndex` up by `srcArray.length()` index positions. 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/CompactedArray/insert-05.adoc[insert]( std::size_t dstIndex, xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray] const& srcArray); ---- [.small]#xref:BloombergLP/bdlc/CompactedArray/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 index position. The behavior is undefined unless `dstIndex <= length()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/bdlc/CompactedArray/insert-08.adoc[insert]( std::size_t dstIndex, TYPE const& value); ---- [.small]#xref:BloombergLP/bdlc/CompactedArray/insert-08.adoc[_» more..._]# Insert into this array, at the specified `dstIndex`, the specified `numElements` starting at the specified `srcIndex` in the specified `srcArray`. Elements having an index greater than or equal to `dstIndex` before the insertion are shifted up by `numElements` index 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/CompactedArray/insert-0b.adoc[insert]( std::size_t dstIndex, xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray] const& srcArray, std::size_t srcIndex, std::size_t numElements); ---- [.small]#xref:BloombergLP/bdlc/CompactedArray/insert-0b.adoc[_» more..._]# [.small]#Created with https://www.mrdocs.com[MrDocs]#