From -3303805961279347881
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,3b19a004e78de1c9
X-Google-Attributes: gidf78e5,public
X-Google-ArrivalTime: 1994-03-05 07:35:13 PST
Newsgroups: comp.std.c++
Path: gmd.de!xlink.net!howland.reston.ans.net!vixen.cso.uiuc.edu!sdd.hp.com!cs.utexas.edu!swrinde!ihnp4.ucsd.edu!munnari.oz.au!cs.mu.OZ.AU!munta.cs.mu.OZ.AU!fjh
From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
Subject: Re: Standard for order of base-class specification?
Message-ID: <9406502.10222@mulga.cs.mu.OZ.AU>
Sender: news@cs.mu.OZ.AU
Organization: Computer Science, University of Melbourne, Australia
References: <HOLCOMB.94Feb28155855@donald.wg.com>
Date: Sat, 5 Mar 1994 15:35:13 GMT
Lines: 21

holcomb@wg.com (Edgar Holcomb) writes:

>Is it dangerous to assume the structure of an instance of a
>class with multiple base classes based on the order in which
>the base classes are specified?

Yes.

>Is it safe to assume that, within the
>Derived object, the BaseA sub-object will be at offset zero
>and the BaseB sub-object will be at offset sizeof( BaseA )?

No.

>I don't know if the language defines this, or if it's
>compiler specific.

It's highly implementation-dependant.

-- 
Fergus Henderson - fjh@munta.cs.mu.oz.au


