BitArray.sort

Sorts the BitArray's elements.

struct BitArray
@property @nogc pure nothrow return
sort
()
out (result) { assert (result == this, "the result must be equal to this"); }

Examples

size_t x = 0b1100011000;
auto ba = BitArray(10, &x);
ba.sort;
foreach (i; 0 .. 6)
    assert(ba[i] == false);
foreach (i; 6 .. 10)
    assert(ba[i] == true);

Meta