From -5577164043090896858
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: f78e5,3cdb654b702f7476
X-Google-Attributes: gidf78e5,public
From: kanze@gabi-soft.de
Subject: Re: virtual functions
Date: 2000/08/23
Message-ID: <86itsr207l.fsf@gabi-soft.de>#1/1
X-Deja-AN: 661735050
Content-Transfer-Encoding: quoted-printable
Approved: Fergus Henderson <fjh@cs.mu.oz.au>, moderator of comp.std.c++
References: <399A78E4.8345D7B@gmx.at> <m23dk5jiuq.fsf@brownie.frogger.foobar.snot> <399B8FA6.540D5B7F@gmx.at> <m2hf8jigxk.fsf@brownie.frogger.foobar.snot> <XfLn5.3006$Vb.76744@ozemail.com.au>
X-Authentication-Warning: mulga.cs.mu.OZ.AU: fjh set sender to devnull@stump.algebra.com using -f
Content-Type: text/plain; charset=iso-8859-1
X-Complaints-To: abuse@demon.net
X-Mail2News-Path: news.demon.net!mulga.cs.mu.oz.au
X-Trace: mail2news.demon.co.uk 967071472 mail2news:7584 mail2news mail2news.demon.co.uk
Organization: Customer of UUNET Deutschland GmbH
X-Robomod: STUMP, ichudov@algebra.com (Igor Chudov)
User-Agent: Gnus/5.0805 (Gnus v5.8.5) Emacs/20.4
MIME-Version: 1.0
X-MIME-Autoconverted: from 8bit to quoted-printable by mulga.cs.mu.OZ.AU id IAA05264
Newsgroups: comp.std.c++

"michael" <serrano@ozemail.com.au> writes:

|>  > It is true only inside constructors *and* destructors. In all
|>  > other cases, the overriding method of the object's dynamic type is
|>  > called.

|>  It is true during construction and destruction.  You can't defeat
|>  the behaviour by having the ctor forward to a helper.

In all cases, the overriding method of the object's dynamic type is
called.  There are no special rules for constructors or destructors.
(Of course, in the constructor or destructor for X, the dynamic type of
the object is X.)

--=20
James Kanze                               mailto:kanze@gabi-soft.de
Conseils en informatique orient=E9e objet/
                   Beratung in objektorientierter Datenverarbeitung
Ziegelh=FCttenweg 17a, 60598 Frankfurt, Germany Tel. +49(069)63198627

---
[ 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://reality.sgi.com/austern_mti/std-c++/faq.html              ]




