22 Mar
2017
22 Mar
'17
11:06 p.m.
On 23/03/2017 11:44, Andrey Semashev via Boost wrote:
On 03/22/17 20:14, Richard Hodges via Boost wrote:
I agree that bitfields are not the way to go. They suffer from a number of deficiencies - not least that each bit is *not a separate object* so they are problematic i multithreaded environments. They also of course carry no type information.
Thread safety is a red herring since none of the solutions presented in this discussion are thread safe.
FWIW, I have some code kicking around somewhere that lets you treat a manually bit-mask-valued enum as atomic. But yes, that's off-topic.