Login
From:
www.foonathan.net
(Uncensored)
subscribe
Implementation Challenge flag_set: Type-safe, hard to misuse bitmask
https://www.foonathan.net/2017/03/implementation-challenge-bitmask/
links
backlinks
Roast topics
Find topics
Find it!
This post shows how you can implement an alternative to flag enums with power-of-two-values in a way that is type-safe, easy and prevents common misuse of bitwise operators.