| 141 | |
| 142 | * a generic bitfield traits class providing generic getter and setter methods. |
| 143 | * a BOOST_BITFIELD_DCL macro making easier the definition of the bitfield traits and the bitfield getter and setter functions. |
| 144 | |
| 145 | {{{ |
| 146 | #!cpp |
| 147 | struct X { |
| 148 | typedef boost::ubig_32 storage_type; |
| 149 | storage_type d0; |
| 150 | typedef unsigned int value_type; |
| 151 | BOOST_BITFIELD_DCL(storage_type, d0, unsigned int, d00, 0, 10); |
| 152 | BOOST_BITFIELD_DCL(storage_type, d0, unsigned int, d01, 11, 31); |
| 153 | }; |
| 154 | }}} |