🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Casting within MI Graphs

#425
From: Marshall Cline
Date: Mon, 27 Aug 1990 16:50
19 lines
1716 bytes
In article <48168@brunix.UUCP> sdm@cs.brown.edu (Scott Meyers) writes:
> Does E&S prohibit explicit casts from pointers to virtual base classes to
> pointers to derived classes?

Yes, these casts, even though explicit, are illegal.  The July issue of
The C++ Report contains a C++ Puzzle solution showing why.  Basically
there is no way of knowing at compile time how to perform the cast.  The
cover article in the same issue shows a portable method of faking the
cast.  The method requires maintaining run-time type information.

Marshall Cline
--
==============================================================================
Marshall Cline / Asst.Prof / ECE Dept / Clarkson Univ / Potsdam, NY 13676
cline@sun.soe.clarkson.edu / Bitnet:BH0W@CLUTX / uunet!clutx.clarkson.edu!bh0w
Voice: 315-268-3868 / Secretary: 315-268-6511 / FAX: 315-268-7600
Career search in progress; ECE faculty; research oriented; will send vita.
PS: If your company is interested in on-site C++/OOD training, drop me a line!
==============================================================================
Technical Details
Message-ID: <CLINE.90Aug27124642@cheetah.ece.clarkson.edu>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!image.soe.clarkson.edu!news
References: <48168@brunix.UUCP>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!image.soe.clarkson.edu!news
From: cline@cheetah.ece.clarkson.edu (Marshall Cline)
Newsgroups: comp.std.c++
Subject: Re: Casting within MI Graphs
Message-ID: <CLINE.90Aug27124642@cheetah.ece.clarkson.edu>
Date: 27 Aug 90 16:50:09 GMT
References: <48168@brunix.UUCP>
Sender: news@sun.soe.clarkson.edu
Reply-To: cline@sun.soe.clarkson.edu (Marshall Cline)
Organization: (I don't speak for the) ECE Dept, Clarkson Univ, Potsdam, NY
Lines: 20
In-reply-to: sdm@cs.brown.edu's message of 24 Aug 90 19:28:07 GMT