|
Boost : |
From: Austin Gilbert (austin.gilbert_at_[hidden])
Date: 2006-03-06 09:32:03
I am also interested.
On 3/4/06, Emile Cormier <emilecormier_at_[hidden]> wrote:
>
> First, I'd like to thank everyone who contributed to this wonderful
> library. We use Boost at work, and I'd like to contribute back.
>
> I've come up with a portable mechanism that allows the declaration of
> bitfields much like the way you do in C++. The syntax for using these
> bitfields is the same as that of C++ bitfields. My solution doesn't
> suffer from the ambiguity in C++ where you don't know whether the first
> bitfield starts at the most significant or least significant end of the
> word. It also doesn't suffer from the problem in C++ bitfields where the
> compiler can arbitrarily decide to align bitfields along word
> boundaries.
>
> This solution has been very useful to me when dealing with hardware
> registers and with 16-bit color formats.
>
> I am aware of the existance of std::bitset, but it doesn't handle groups
> of bits like bitfields do.
>
> If there's interest, I'll post some code here.
>
> Emile Cormier
> --
> Emile Cormier
> emilecormier_at_[hidden]
>
> _______________________________________________
> Unsubscribe & other changes:
> http://lists.boost.org/mailman/listinfo.cgi/boost
>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk