Boost logo

Boost :

From: Emile Cormier (emilecormier_at_[hidden])
Date: 2006-03-06 18:40:30

You can download the code at the Boost vault:

test.cpp contains a regression test that you can try on your compiler.
Please let me know if it works, as I've only tested this on MinGW GCC

The bitfield mechanism relies on this assumption: Unions of
non-polymorphic, non-derived objects, having the exact same underlying
data member type, will have the same size as this underlying data member
type. I'm no language lawyer, so please let me know if this is a safe
and portable assumption.

Let me know if things aren't sufficiently self-explanatory, or if things
can be improved.

  Emile Cormier

Boost list run by bdawes at, gregod at, cpdaniel at, john at