Boost logo

Boost :

From: Bohdan (gejrlaug_at_[hidden])
Date: 2003-09-25 14:45:46


"Rozental, Gennadiy" <gennadiy.rozental_at_[hidden]> wrote in message
news:1373D6342FA1D4119A5100E029437F6405E1FA69_at_clifford.devo.ilx.com...
> Probably not. Because of the allignment.
>
> struct A {
> int a;
> char b;
> };
>
> sizeof(A) = 8
>
> Gennadiy
>

I'm using bcc32 option -a1 -Vx -Ve which means that
    1. -a1 : aligment is 1
    2. -Vx : Zero-length class data member
    3. -Ve : Zero-length empty base classes

And with this option set your example gives size 5,
and sizeof(variant<int>) is still is 8.

regards,
bohdan


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