BitArray/BitFields - Review
Era Scarecrow
rtcvb32 at yahoo.com
Sat Jul 28 16:01:08 PDT 2012
On Saturday, 28 July 2012 at 22:43:22 UTC, bearophile wrote:
> Era Scarecrow:
>
>> BitFields:
>> I've concentrated on adding default values.
>
> Good, that's useful.
>
>
> Regarding BitArray I have written some ER:
>
> http://d.puremagic.com/issues/show_bug.cgi?id=4123
> http://d.puremagic.com/issues/show_bug.cgi?id=4124
> http://d.puremagic.com/issues/show_bug.cgi?id=4717
> http://d.puremagic.com/issues/show_bug.cgi?id=7487
> http://d.puremagic.com/issues/show_bug.cgi?id=7488
> http://d.puremagic.com/issues/show_bug.cgi?id=7490
4123 - fixed
4124 - Set/reset all bits ie:
BitArray ba = BitArray(100);
ba[] = true;
Others haven't been done yet.
4717 - Same as 4124, none others done yet.
7487 - Done. When prepending it extends the array to size_t extra
and slowly backtracks until it needs to do it again. To go
further, have to disable re-slicing of the allocated array.
Or perhaps a 'start at end' during constructor stage. Hmmm..
7488 - Done, union used and is 'compact' version (by default or
resized and can fit)
7490 - haven't touched yet. :(
> Related:
> http://d.puremagic.com/issues/show_bug.cgi?id=6697
Not so sure. Could make a multi-dimentional one that returns
slices to various sections, but that's iffy. I'd need an example
of how you'd use it with BitArray before I could build a solution.
More information about the Digitalmars-d-learn
mailing list