operator [] method

bool operator [] (T index)

Returns whether the bit with the given index is set to one.

Implementation

bool operator [](T index) {
  assert(index.index < _length);
  return (_bits & 1 << index.index) > 0;
}