Boost logo

Boost :

Subject: Re: [boost] How best to implement a bitfield in C++ 14?
From: TONGARI J (tongari95_at_[hidden])
Date: 2016-02-03 04:30:09


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


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