[#BloombergLP-bdlc-CompactedArray-replace-0c] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/CompactedArray.adoc[CompactedArray]::replace :relfileprefix: ../../../ :mrdocs: `replace` overloads == Synopses Declared in `<bdlc_compactedarray.h>` Change the value of the element at the specified `dstIndex` in this array to the specified `value`. The behavior is undefined unless `dstIndex < length()`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/bdlc/CompactedArray/replace-08.adoc[replace]( std::size_t dstIndex, TYPE const& value); ---- [.small]#xref:BloombergLP/bdlc/CompactedArray/replace-08.adoc[_» more..._]# Replace elements at `dstIndex` with elements from `srcArray`. [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- void xref:BloombergLP/bdlc/CompactedArray/replace-0d.adoc[replace]( 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/replace-0d.adoc[_» more..._]# == Parameters [cols="1,4"] |=== | Name| Description | *dstIndex* | index of the element to replace | *value* | new value for the element | *srcArray* | array providing replacement values | *srcIndex* | first index in `srcArray` to copy from | *numElements* | number of elements to replace |=== [.small]#Created with https://www.mrdocs.com[MrDocs]#