
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.
However, I am struggling to see how the proposed class is any more useful than a std::tuple classes that support a bool conversion operator.
Can you demonstrate a use case where a tuple is inadequate?
std::tuple does not compress bits, which is what std::bitset and bitfields do. Also, please, don't top-post. See the discussion policy here: http://www.boost.org/community/policy.html