https://issues.dlang.org/show_bug.cgi?id=20242
Issue ID: 20242
Summary: BitArray constructor should not modify input data
Product: D
Version: D2
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P4
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
Depends on: 20241
Currently BitArray.this has the peculiar behavior in that it modifies the data
referenced from its arguments to clear bits past the specified length. This is
documented with a big scary warning in its DDoc. However, I don't see why this
behavior is necessary for BitArray to work, as it should never be even
accessing bits past its designated length, and it stands in the way of some
BitArray applications (i.e. building multiple BitArrays from the same immutable
source data but with different length).
Referenced Issues:
https://issues.dlang.org/show_bug.cgi?id=20241
[Issue 20241] BitArray.bitsSet ignores length
--