Boost logo

Boost :

From: William Ward (william.ward_at_[hidden])
Date: 2000-12-19 06:32:01


 I'm having a problem with an increase in object size when using the
operators library from boost, using GCC 2.95.2. I use single inheritence
to derive from the Boost classes using the base chaining technique described
in http://www.boost.org/libs/utility/operators.htm#chaining as follows :

tempate< int X>
class Test
           : boost::less_than_comparable1<Test<X>
           , boost::equality_comparable<Test<X>
           , boost::addable<Test<X>
           , boost::subtractable<Test<X>
           , boost::multipliable<Test<X>
           , boost::dividable<Test<X>
> > > > > >
{
.....
};

This causes an increase in the object size in GCC of 1 byte, which
increases to 4 bytes with alignment. This increase does not occur in
VC++6.0. I was
wondering if there is any workaround for GCC to remove this increase
because in my application even a 4 byte penalty is unacceptable.


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