From 5518634981172971981
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,cda54862ecb4a41f
X-Google-Attributes: gidf78e5,public
X-Google-Thread: fc772,cda54862ecb4a41f
X-Google-Attributes: gidfc772,public
X-Google-ArrivalTime: 2001-08-29 14:52:09 PST
Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed.news.qwest.net!namche.sun.com!news2me.EBay.Sun.COM!engnews1.eng.sun.com!taumet!clamage
From: deepa@eventhelix.com (Deepa Ahluwalia)
Newsgroups: comp.std.c++,comp.lang.c++.moderated
Subject: Re: storage order of inherited classes
Date: 29 Aug 2001 21:40:57 GMT
Organization: http://groups.google.com/
Lines: 27
Approved: stephen.clamage@sun.com (comp.std.c++)
Message-ID: <6a9a3562.0108281505.7b86a7df@posting.google.com>
References: <MpMh7.6544$3f.1248650@news2-win.server.ntlworld.com>
NNTP-Posting-Host: taumet.eng.sun.com
X-NNTP-Posting-Host: netlab.cs.rpi.edu
X-Original-Date: 28 Aug 2001 16:05:22 -0700
X-Submission-Address: c++-submit@netlab.cs.rpi.edu
X-Auth: PGPMoose V1.1 PGP comp.lang.c++.moderated
	iQBVAwUAO41OCEHMCo9UcraBAQE+6AIAqRnxtTeUOcyg1gAMD2Wkv3d/8yYFfpNv
	WEqA6FjyFmMSmvOH+jx69yezclQkLSrLQj93jpisUj4nUKod7C6TdQ==
	=BIFm
X-Approved-For-Group: jep@eagle.lhup.edu comp.lang.c++.moderated
Content-Length: 895
X-Status: $$$$
X-UID: 0000000001
Originator: clamage@taumet
Xref: archiver1.google.com comp.std.c++:7229 comp.lang.c++.moderated:25658


With most compilers elements of class A would be included before B.
Typical order is:

    Elements of A
    Vtable pointer (if present)
    Elements of B

Check the following articles for ordering of elements:

http://www.eventhelix.com/RealtimeMantra/Basics/ComparingCPPAndCPerformance.htm
http://www.eventhelix.com/RealtimeMantra/Basics/ComparingCPPAndCPerformance2.htm

Deepa



      [ Send an empty e-mail to c++-help@netlab.cs.rpi.edu for info ]
      [ about comp.lang.c++.moderated. First time posters: do this! ]

[ comp.std.c++ is moderated.  To submit articles, try just posting with ]
[ your news-reader.  If that fails, use mailto:std-c++@ncar.ucar.edu    ]
[              --- Please see the FAQ before posting. ---               ]
[ FAQ: http://www.research.att.com/~austern/csc/faq.html                ]
[ Note that the FAQ URL has changed!  Please update your bookmarks.     ]




