Boost logo

Boost :

From: Gennadiy Rozental (gennadiy.rozental_at_[hidden])
Date: 2003-09-25 03:51:55


> It seems that alignment does not affect sizeof.

It definetly does.

> (and no, I didn't write these tests now: I got the same
> question in a code-review recently)

I do not understand your test. But, maybe, you should put char type
somewhere in your structs.

> Michael

Gennadiy.

> Probably not. Because of the allignment.
>
> struct A {
> int a;
> char b;
> };
>
> sizeof(A) = 8
>
> Gennadiy
>
> > With Borland (bcc32[5.5.1] -a1 -Ve -Vx )
> > sizeof(variant<int,char*>) is equal to 8.
> > Shouldn't this size be 5 ?
> >
> >
> > regards,
> > bohdan


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