|
Boost : |
Subject: Re: [boost] How best to implement a bitfield in C++ 14?
From: TONGARI J (tongari95_at_[hidden])
Date: 2016-02-03 04:37:36
2016-02-03 17:30 GMT+08:00 TONGARI J <tongari95_at_[hidden]>:
> 2016-02-03 17:01 GMT+08:00 Niall Douglas <s_sourceforge_at_[hidden]>:
>
> [...]
>
> So, do Boosters think we can actually make a C++ 14 bitfield which:
>>
>> 1. Is typesafe, so not a C bitfield.
>>
>> 2. Is convenient for programmers to declare (i.e. little boilerplate
>> in a specific bitfield declaration).
>>
>> 3. Works as you'd expect a bitfield to work, including
>> bitfield::flag.
>>
>> 4. if(bf) works.
>>
>> 5. Is 100% constexpr and generates zero runtime overhead.
>>
>
> This is what I have:
> http://melpon.org/wandbox/permlink/RDl3B6EmnG5hRuAJ
>
After re-reading your post, I think this doesn't meet your requirement :p
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk