Bug 5520 – bitfieldsOn

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P2
Component
phobos
Product
D
Version
D2
Platform
Other
OS
Linux
Creation time
2011-02-02T17:54:23Z
Last change time
2020-03-21T03:56:40Z
Assigned to
Era Scarecrow
Creator
Ellery Newcomer

Comments

Comment #0 by ellery-newcomer — 2011-02-02T17:54:23Z
I think it would be nice to have a variation of bitfields which generates operations on a preexisting field, e.g. struct Z{ Foobar f; mixin(bitfieldsOn!("f.squirt.honk" bool, "buzz",1, uint, "fuzz",7, )); }
Comment #1 by rtcvb32 — 2012-08-01T08:10:33Z
Current branch adds the feature. I do see it as useful. Once current pull is accepted, this will be resolved. https://github.com/rtcvb32/phobos/commit/620ba57cc0a860245a2bf03f7b7f5d6a1bb58312
Comment #2 by yebblies — 2012-10-27T09:46:58Z
Could you add a link to the pull request you're talking about? Same for issue 4935.
Comment #3 by safety0ff.bugz — 2013-10-05T09:24:46Z
He seems to have been referring to pull requests: 1045, 719, 734 and 740 (all closed unmerged.)
Comment #4 by andrej.mitrovich — 2014-04-29T15:43:20Z
Couldn't you use a union for this?
Comment #5 by b2.temp — 2015-11-21T13:53:16Z