Boost logo

Boost :

Subject: [boost] Boost Libraries under development: Bitfields
From: vicente.botet (vicente.botet_at_[hidden])
Date: 2009-05-12 18:02:21


Hi,

I have adapted the Bitfield library from Emile Cormier with its permision.

Boost.Bitfield consists of:
  a.. a generic bitfield traits class providing generic getter and setter methods.
  b.. a BOOST_BITFIELD_DCL macro making easier the definition of the bitfield traits and the bitfield getter and setter functions.
    struct X {
        typedef boost::ubig_32 storage_type;
        storage_type d0;
        typedef unsigned int value_type;
        BOOST_BITFIELD_DCL(storage_type, d0, unsigned int, d00, 0, 10);
        BOOST_BITFIELD_DCL(storage_type, d0, unsigned int, d01, 11, 31);
    };

The library is quite stable but I want to add some test with Boost.Endian before adding it to the formal review schedule list.

Here is the link from which you can get the library code + documentation + test

https://svn.boost.org/trac/boost/wiki/LibrariesUnderConstruction#Boost.Bitfield

I'd appreciate if people could take a look, test it on their compiler and give me some feedback.

Thanks for all,
_____________________
Vicente Juan Botet Escribá


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