|
Boost : |
Subject: Re: [boost] Is there any interest in type-safe container of bool flags with noexcept guarantees?
From: Andrey Semashev (andrey.semashev_at_[hidden])
Date: 2017-03-22 22:44:39
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
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk