www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 21628] New: The padding bits of bitfields could be calculated

https://issues.dlang.org/show_bug.cgi?id=21628

          Issue ID: 21628
           Summary: The padding bits of bitfields could be calculated
                    automatically
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: nobody puremagic.com
          Reporter: bugzilla bernis-buecher.de

struct A
{
    mixin(bitfields!(
        bool, "flag1",    1,
        bool, "flag2",    1));
}

could be treated as if it were

struct A
{
    mixin(bitfields!(
        bool, "flag1",    1,
        bool, "flag2",    1,
        uint, "",         6));
}

--
Feb 10