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

          Issue ID: 16187
           Summary: std.bitmanip fields should be lvalues
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: phobos
          Assignee: [email protected]
          Reporter: [email protected]

Consider this example:

import std.bitmanip : bitfields;

struct BitVector
{
    mixin(bitfields!(uint, "x",  8));
}

BitVector vec;

vec.x = 2; // OK
vec.x += 2; // ERROR: vec.x isn't a lvalue

What was/is blocking such fields to be lvalues?

--

Reply via email to