[Issue 4425] More bells & whistles for bitfields
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Thu Aug 2 22:02:49 PDT 2012
http://d.puremagic.com/issues/show_bug.cgi?id=4425
Era Scarecrow <rtcvb32 at yahoo.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
CC| |rtcvb32 at yahoo.com
AssignedTo|nobody at puremagic.com |rtcvb32 at yahoo.com
--- Comment #3 from Era Scarecrow <rtcvb32 at yahoo.com> 2012-08-02 22:02:41 PDT ---
Adding const to a field seems pretty easy; specifically the setter is simply
left out of the template. So as a final proposed usage, it would look like:
mixin(bitfields(
int, "named", 4,
const int, "c_named", 4,
uint, "named_def=5", 4, //includes defaulted value of 5
const uint, "c_named_def=10", 4)); //defaulted value of 10
bitfieldsOn is being worked on, and effectively works identically to bitfields
except you specify a variable you want to use; Default values won't work well
with it however.
--
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