[Issue 20242] New: BitArray constructor should not modify input data

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 25 07:56:27 UTC 2019


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: dlang-bugzilla at thecybershadow.net
          Reporter: dlang-bugzilla at thecybershadow.net
        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
--


More information about the Digitalmars-d-bugs mailing list