Boost logo

Boost :

Subject: Re: [boost] Is there any interest in type-safe container of bool flags with noexcept guarantees?
From: Gavin Lambert (gavinl_at_[hidden])
Date: 2017-03-22 23:06:15


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.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk