StaticBitArray.opCmp

Supports comparison operators for StaticBitArray.

struct StaticBitArray(uint capacity, Block = DefaultBlock)
@safe const @trusted
int
opCmp
(
Block2
)
(
in StaticBitArray!(capacity, Block2) a2
)
if (
isUnsigned!Block2
)
if (
isUnsigned!DefaultBlock
)

Examples

auto a = StaticBitArray!(5, ubyte)([1,0,1,0,1]);
auto b = StaticBitArray!(5, ushort)([1,0,1,1,1]);
auto c = StaticBitArray!(5, uint)([1,0,1,0,1]);
auto d = StaticBitArray!(5, ulong)([1,1,1,1,1]);
assert(a <  b);
assert(a <= b);
assert(a == c);
assert(a <= c);
assert(a >= c);
assert(c < d);

Meta