[Issue 4935] std.bitmanip: bitfields!() template with trailing unnamed field does not work

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Sep 24 18:01:50 PDT 2010


http://d.puremagic.com/issues/show_bug.cgi?id=4935



--- Comment #2 from Austin Hastings <ah08010-d at yahoo.com> 2010-09-24 18:01:07 PDT ---
Entertainingly, this is the "real" code I was trying to work on:

union Instruction {
    ushort raw;

    // Basic opcode + data
    mixin(bitfields!(
                 Opcode, "opcode", 7,
                 uint, "rest", 9));

Is it only people working with opcodes that want to use bitfields? :)

Also, I think I'm going to request that repeated bitfield definitions be
allowed if they are identical - I'd like to redeclare "opcode" rather than "".

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list