More for bitfields
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Sun Jul 4 12:07:15 PDT 2010
bearophile wrote:
> This blog post shows possible ideas to make std.bitmanip.bitfields more complete:
> http://potential-lang.org/2010/07/02/quasi-quoting-ascii-art-to-define-data-structures/
>
> An example of the ideas:
> struct IntDesc_t {
> ...
> immutable IST : 3 = 0;
> immutable Unused0 : 5 = 0;
> immutable type : 4 = 0b1110;
> immutable Unused1 : 1 = 0b0;
> dpl : 2;
> p : 1;
> ....
>
> That means allowing the fields to have an optional initialization value. And they can be flagged to be immutable too :-) Bit fields that can't change are common.
>
> Bye,
> bearophile
Sounds good. Did you have a chance to enter that into bugzilla?
Andrei
More information about the Digitalmars-d
mailing list