Sets all the values in the BitArray to the value specified by val.
import std.algorithm.comparison : equal; auto b = BitArray([1, 0, 1, 0, 1, 1]); b[] = true; // all bits are set assert(b.bitsSet.equal([0, 1, 2, 3, 4, 5])); b[] = false; // none of the bits are set assert(b.bitsSet.empty);
See Implementation
Sets all the values in the BitArray to the value specified by val.