The OpenD Programming Language

BitArray.opUnary

Support for unary operator ~ for BitArray.

struct BitArray
const pure nothrow
opUnary
(
string op
)
()
if (
op == "~"
)

Examples

bool[] ba = [1,0,1,0,1];

auto a = BitArray(ba);
BitArray b = ~a;

assert(b[0] == 0);
assert(b[1] == 1);
assert(b[2] == 0);
assert(b[3] == 1);
assert(b[4] == 0);

Meta