Insert elements from srcQueue into this queue at dstIndex.

Synopsis

Declared in <bdlc_queue.h>

void
insert(
    int dstIndex,
    Queue const& srcQueue,
    int srcIndex,
    int numElements);

Description

Insert the specified numElements values starting at the specified srcIndex position from the specified srcQueue into this queue at the specified dstIndex. All current values with indices at or above dstIndex are shifted up by numElements index positions. The behavior is undefined unless 0 <= dstIndex <= length(), 0 <= srcIndex, 0 <= numElements, and srcIndex + numElements <= srcQueue.length().

Parameters

Name

Description

dstIndex

index at which to insert

srcQueue

queue providing values to insert

srcIndex

first index in srcQueue to copy from

numElements

number of elements to insert

Created with MrDocs