🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.std.c++
Article #3954

Re: dynamic_cast<void*>

#3954
From: Fergus Henderson
Date: Mon, 08 Apr 1996 09:03
37 lines
2420 bytes
anhaeupl@late.e-technik.uni-erlangen.de (Bernd Anhaeupl) writes:

>Section 5.2.6 paragraph 7 of the April 95 WP states, that for
>polymorphic types, the result of a dynamic_cast<void*>(v) "is a
>pointer to the complete object (12.6.2) pointed to by v". Now 
>section 12.6.2 does not define the term "complete object", which
>actually happens in section 1.4 paragraph 2, but the term 
>"most derived class". This makes a differnce, if we pass a pointer
>to a data member subobject (and not a base class subobject) to
>dynamic_cast. According to 12.6.2, we would get the address of that
>data member, according to 1.4, the address of the containing 
>object of that data member.
>
>Please note, that the term "complete object (12.6.2)" is also used 
>in section 5.2.7, where the typeid expression is defined. Therefore 
>I suppose, that in 5.2.6 and 5.2.7 "most derived object" is meant 
>instead of "complete object" in both sections. Is this correct?

Yes.  

The term "complete object" was used to mean two different things
by different members of the C++ committee; one of those meanings
is what is now called "most derived object".

This error has been corrected in the Jan 96 draft, both in 5.2.6
and in 5.2.7.

--
Fergus Henderson <fjh@cs.mu.oz.au>   |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>   |  of excellence is a lethal habit"
PGP: finger fjh@128.250.37.3         |     -- the last words of T. S. Garp.
---
[ 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         ]
[ FAQ:      http://reality.sgi.com/employees/austern_mti/std-c++/faq.html    ]
[ Policy:   http://reality.sgi.com/employees/austern_mti/std-c++/policy.html ]
[ Comments? mailto:std-c++-request@ncar.ucar.edu                             ]
Technical Details
Message-ID: <4k8g95$jcq@mulga.cs.mu.OZ.AU>
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
References: <4k1a4r$dim@rznews.rrze.uni-erlangen.de>

Show Full Headers
Complete Article Headers
From: fjh@mundook.cs.mu.OZ.AU (Fergus Henderson)
Message-ID: <4k8g95$jcq@mulga.cs.mu.OZ.AU>
X-Original-Date: 7 Apr 1996 13:34:29 GMT
Path: arc1-ca.pugleaf.net!in1.uu.net!bounce-back
Date: 08 Apr 96 09:03:00 GMT
Approved: fjh@cs.mu.oz.au
Newsgroups: comp.std.c++
Subject: Re: dynamic_cast<void*>
Organization: Comp Sci, University of Melbourne
References: <4k1a4r$dim@rznews.rrze.uni-erlangen.de>
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMWjWS+EDnX0m9pzZAQFd/gF+K/Z7I2g+Z56Ea6w1+AnCKVp1vPtwy1Rw
 /EmbWLKtycINQKPcWubkimtWpFY4/lGQ
 =cNU/