🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Is dynamic_cast safe?

#3534
From: Fergus Henderson
Date: Wed, 28 Feb 1996 14:56
25 lines
1799 bytes
lars.farm@nts.mh.se (Lars Farm) writes:

>     5.2.6  Dynamic cast                           [expr.dynamic.cast]
>   ...
>   6 Otherwise,  v shall be a pointer to or an lvalue of a polymorphic type
>   ...
>What should happen when 'v' is not a pointer to or an lvalue of a
>polymorphic type? return 0? crash? throw bad_cast? undefined?

If `v' is not a pointer to or an lvalue of a polymorphic type, then
the program is ill-formed, and the implementation must issue a diagnostic.

--
Any mail to me between Feb 25th and 27th may have gone to the bit bucket
(#&$^@$!# mail software silently ignored disk full error).  Please resend.
(comp.std.c++ articles were not affected, so no need to resend those.)
Fergus Henderson             	WWW: http://www.cs.mu.oz.au/~fjh
fjh@cs.mu.oz.au              	PGP: finger fjh@128.250.37.3
---
[ 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: <4h1dj3$b6b@mulga.cs.mu.OZ.AU>
Path: arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-back
References: <AD58B8389668E1A9@sleipner.nts.mh.se>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!cs.mu.OZ.AU!bounce-back
From: fjh@munta.cs.mu.OZ.AU (Fergus Henderson)
Newsgroups: comp.std.c++
Subject: Re: Is dynamic_cast safe?
Date: 28 Feb 96 14:56:00 GMT
Organization: Comp Sci, University of Melbourne
Approved: fjh@cs.mu.oz.au
Message-ID: <4h1dj3$b6b@mulga.cs.mu.OZ.AU>
References: <AD58B8389668E1A9@sleipner.nts.mh.se>
NNTP-Posting-Host: munta.cs.mu.oz.au
X-Original-Date: 28 Feb 1996 11:16:51 GMT
X-Auth: PGPMoose V1.1 PGP comp.std.c++
 iQBFAgUBMTRtD+EDnX0m9pzZAQFQcgF/R8Z88XQfm8bKmDJcybWY3jJAu06l/lfj
 0IPkWqBDgQLhjFHfZM56NKoSzip59wcW
 =DzOV
Originator: fjh@munta.cs.mu.OZ.AU