Exchange the bit values at index1 and index2.
Synopsis
Declared in <bdlc_bitarray.h>
void
swapBits(
std::size_t index1,
std::size_t index2);
Description
Efficiently exchange the values of the bits at the specified index1 and index2 indices. The behavior is undefined unless index1 < length() and index2 < length().
Parameters
Name |
Description |
index1 |
first bit position to exchange |
index2 |
second bit position to exchange |
Created with MrDocs