StaticBitArray.opIndexAssign

Sets the i'th bit. No range checking needed.

struct StaticBitArray(uint capacity, Block = DefaultBlock)
@safe pragma(inline, true) @trusted
bool
opIndexAssign
(
ModUInt
)
(
bool b
,
Mod!(capacity, ModUInt) i
)
if (
isUnsigned!ModUInt
)
if (
isUnsigned!DefaultBlock
)

Examples

StaticBitArray!2 bs;
bs[0] = true;
assert(bs[0]);
assert(!bs[1]);
bs[1] = true;
assert(bs[1]);

Meta