Replace numElements at dstIndex with values from srcArray.

Synopsis

Declared in <bdlc_packedintarray.h>

void
replace(
    std::size_t dstIndex,
    PackedIntArray const& srcArray,
    std::size_t srcIndex,
    std::size_t numElements);

Description

Change the values of the specified numElements elements in this array beginning at the specified dstIndex to those of the numElements values in the specified srcArray beginning at the specified srcIndex. The behavior is undefined unless srcIndex + numElements <= srcArray.length() and dstIndex + numElements <= length(). Note that if this array and srcArray are the same, the behavior is as if a copy of srcArray were passed.

Parameters

Name

Description

dstIndex

first index in this array to replace

srcArray

source array providing replacement values

srcIndex

first index in srcArray to copy from

numElements

number of elements to replace

Created with MrDocs