[Issue 19338] std.bitmanip.BitArray.count gives segfault for empy BitArray

2018-10-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19338 github-bugzi...@puremagic.com changed: What|Removed |Added Status|NEW |RESOLVED

[Issue 19338] std.bitmanip.BitArray.count gives segfault for empy BitArray

2018-10-30 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19338 --- Comment #3 from github-bugzi...@puremagic.com --- Commits pushed to master at https://github.com/dlang/phobos https://github.com/dlang/phobos/commit/9d7f453f1f960c0cc0e4e67e27ef63c5a0825c16 fixed issue 19338

[Issue 19338] std.bitmanip.BitArray.count gives segfault for empy BitArray

2018-10-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19338 Richard Palme changed: What|Removed |Added Keywords||bootcamp --

[Issue 19338] std.bitmanip.BitArray.count gives segfault for empy BitArray

2018-10-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19338 --- Comment #2 from Richard Palme --- The phobos implementation of this function is: size_t count() { size_t bitCount; foreach (i; 0 .. fullWords) bitCount +=

[Issue 19338] std.bitmanip.BitArray.count gives segfault for empy BitArray

2018-10-28 Thread d-bugmail--- via Digitalmars-d-bugs
https://issues.dlang.org/show_bug.cgi?id=19338 --- Comment #1 from Richard Palme --- I forgot to mention: the expected return value of b.count for an empty BitArray b would be 0, similar to how b.length returns 0 for empty BitArray b. --