operator []= method

void operator []=(
  1. int index,
  2. bool value
)

Sets the bit specified by the index to the value.

Implementation

void operator []=(int index, bool value) {
  if (value) {
    setBit(index);
  } else {
    clearBit(index);
  }
}