https://issues.dlang.org/show_bug.cgi?id=18133

Jakub Łabaj <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #2 from Jakub Łabaj <[email protected]> ---
Personally, I wouldn't say it's a bug - this particular constructor takes a raw
data that is mapped onto the content of the BitArray. This is consistent (i.e.
is exactly the opposite) with the cast operator to `void[]`:

size_t val = 0b11001111_11010010;
void[] arr = [val];
auto ba = BitArray([val], 16);
assert(cast(void[]) ba == [val]);

Definitely, there should be a note in the doc saying it works in that way - I'm
going to add it.

--

Reply via email to