BloombergLP::bdlc::Queue::swap

Swap the values at the specified indices index1 and index2.

Synopsis

Declared in <bdlc_queue.h>

void
swap(
    int index1,
    int index2);

Description

Swap efficiently the values at the specified indices index1 and index2. The behavior is undefined unless 0 <= index1 < length() and 0 <= index2 < length().

Parameters

NameDescription
index1first index whose value is swapped
index2second index whose value is swapped