Boost logo

Boost :

From: Pavel Vozenilek (pavel_vozenilek_at_[hidden])
Date: 2004-01-06 14:57:41


"David B. Held" <dheld_at_[hidden]> wrote

> #include <iostream>
>
> struct P1 { int x; };
> struct P2 { };
> struct P3 { };
> struct P4 { };
>
> struct S : public P1, public P2, public P3, public P4 { };
>
> int main()
> {
> std::cout << sizeof(S) << std::endl;
> }
>
> On my system, this prints "32" with EBO enabled.
>
I got it down to 7 bytes with the 'EBO' trickery mentioned in other post.
Probably can't get any better on BCB.

/Pavel


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