Re:Low Level Bit Hacks You Absolutely Must Know
by daemin on Friday May 11, 2018 @10:35AM
(#17047571)
Nope, people actually just write the bit setting code. It's simpler and also I haven't found a good generic bit flags class that works as you intend.
[ Parent
| on HN ]
Re:Low Level Bit Hacks You Absolutely Must Know
by slededit on Friday May 11, 2018 @03:30PM
(#17050202)
What about C++ bitfields? Not a library but a language extension. A lot of code I used has migrated to that.
Re:Low Level Bit Hacks You Absolutely Must Know
by daemin on Monday May 14, 2018 @06:59AM
(#17064374)
Normal C++ bitfields?
Sometimes you get that inside classes in the form of "bool x : 1; bool y : 1;" etc.
But that's much harder to use as far as function parameters go, so old school bitmasks are used for that.