From: David B. Held (dheld_at_[hidden])
Date: 2004-01-07 06:16:08
"Lars Gullik Bjønnes" <larsbj_at_[hidden]> wrote in message
> "David B. Held" <dheld_at_[hidden]> writes:
> >> Probably can't get any better on BCB.
> | Actually, you probably can't get much better on any compiler, for
> | reasons listed in one of the threads on SmartPtr, and mentioned
> | in Andrei's & my Oct '03 CUJ article.
> Gcc says size is 4, or are you talking of something differnt?
GCC *might* be wrong to say that. ;) I believe there's currently a
DR on the subject, but I might mistaken. To sum up, there is a way
to read the standard that requires each base class to have a
unique address, which would require them to have non-zero size.
EBO works because the base class can share an address with
the derived class. But two non-virtual base classes might not
be allowed to share an address. That said, I'm very happy that
gcc gives sizeof(4) anyway, and I found that of the compilers I had
to test, it was always the most aggressive in making things small.
--- Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.556 / Virus Database: 348 - Release Date: 12/26/2003
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk