https://issues.dlang.org/show_bug.cgi?id=18133
Issue ID: 18133
Summary: BitArray prints bits in wrong order
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: enhancement
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
unittest
{
import std.bitmanip : BitArray;
import std.format : format;
enum input = "0b11001111_11010010";
auto ba = BitArray([mixin(input)], 16);
assert(format("0b%b", ba) == input);
}
Since D has binary literals, it's non-intuitive and thus bug-prone that the
output of BitArray.toString prints the bits in the opposite order that's used
in said literals.
--