[#BloombergLP-bdlc-PackedIntArrayImp-0a-replace-0e]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlc.adoc[bdlc]::xref:BloombergLP/bdlc/PackedIntArrayImp-0a.adoc[PackedIntArrayImp]::replace
:relfileprefix: ../../../
:mrdocs:

Replace the element at `dstIndex` with `value`&period;

== Synopsis

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

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
replace(
    std::size&lowbar;t dstIndex,
    xref:BloombergLP/bdlc/PackedIntArrayImp-0a/ElementType.adoc[ElementType] value);
----

== Description

Change the value of the element at the specified `dstIndex` in this array to the specified `value`&period; The behavior is undefined unless `dstIndex &lt; length()`&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *dstIndex*
| index of the element to replace
| *value*
| new element value
|===


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