Any interest in a portable bitfields?

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@mailcan.com

Yes, I am interested. Emile Cormier 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

I am also interested. On 3/4/06, Emile Cormier <emilecormier@mailcan.com> 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@mailcan.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost

I am highly interested, as my work involves 3D games, bit-packed representations, and colors. On 3/4/06, Emile Cormier <emilecormier@mailcan.com> wrote:
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'm interested too. We (@motorola) use a lot of them, and always concerned about portability.. Daniel. On 3/4/06, Emile Cormier <emilecormier@mailcan.com> 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@mailcan.com
_______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
participants (5)
-
Allen
-
Andrew Finkenstadt
-
Austin Gilbert
-
Daniel Gutson
-
Emile Cormier