StaticBitArray.opBinary

Support for binary operator - for StaticBitArray.

a - b for StaticBitArray means the same thing as a & ~b.

  1. typeof(this) opBinary(typeof(this) e2)
  2. typeof(this) opBinary(typeof(this) e2)
  3. typeof(this) opBinary(typeof(this) e2)
  4. typeof(this) opBinary(typeof(this) e2)
    struct StaticBitArray(uint capacity, Block = DefaultBlock)
    @safe const
    typeof(this)
    opBinary
    (
    string op
    )
    (
    in typeof(this) e2
    )
    if (
    op == "-"
    )
    if (
    isUnsigned!DefaultBlock
    )

Examples

const a = StaticBitArray!5([1,0,1,0,1]);
auto b = StaticBitArray!5([1,0,1,1,0]);
const c = a - b;
auto d = StaticBitArray!5([0,0,0,0,1]);
assert(c == d);

Meta