www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 16187] New: std.bitmanip fields should be lvalues


          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: nobody puremagic.com
          Reporter: greensunny12 gmail.com

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?

Jun 20 2016