Replace the element at dstIndex with the specified item.
Synopsis
Declared in <bdlc_queue.h>
void
replace(
int dstIndex,
T const& item);
Description
Replace the element at the specified dstIndex in this queue with the specified item. The behavior is undefined unless 0 <= dstIndex < length(). Note that this function is logically equivalent to (but more efficient than): ` insert(dstIndex, item); remove(dstIndex + 1); `
Parameters
Name |
Description |
dstIndex |
index of the element to replace |
item |
replacement value |
Created with MrDocs