Boost logo

Boost :

From: David B. Held (dheld_at_[hidden])
Date: 2004-01-07 14:38:14


"David Abrahams" <dave_at_[hidden]> wrote in message
news:ur7ybg9rg.fsf_at_boost-consulting.com...
>
> I think you're completely wrong on this, Dave. There's no DR
> AFAIK.

Ok, I briefly looked, and there doesn't seem to be one.

> The only thing required by the standard is that two subobjects of
> the same type don't share the same address.

> [...]
> > But two non-virtual base classes might not be allowed to share
> > an address.
>
> Only if they have a common base or subobject.

So how do you read 10.1/4?

    "A base class specifier that does not contain the keyword
    virtual, specifies a nonvirtual base class. A base class
    specifier that contains the keyword virtual, specifies a
    virtual base class. For each distinct occurrence of a nonvirtual
    base class in the class lattice of the most derived class, the
    most derived object (1.8) shall contain a corresponding
    distinct base class subobject of that type."

Even though the examples in that section seem to referring to
the case of a single type appearing multiple times in an
inheritance lattice, the language certainly does not restrict the
definition to that case. So it seems entirely reasonable to me
that the language would apply even without consideration of
common base classes/subobjects. Also, it seems that Mr.
Vandevoorde agrees with this assessment:

http://www.vandevoorde.com/Daveed/News/Archives/000007.html

If it was the intent of the committee to only limit the distinct
requirement to cases of common base classes, it would be
nice if they added a note to 10.1/4 saying so.

Dave

---
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