Topic: Exceptions catching reference-to-pointer-to-base (DR 388)
Author: achapman@arm.com (Andrew Chapman)
Date: Wed, 26 May 2004 14:22:08 +0000 (UTC) Raw View
Section 15.3 paragraph 3 of the Standard lists the rules for
type-matching of thrown exception objects against catch clauses. A
straightforward reading appears to exclude the possibility of thrown
pointer-to-derived being caught by reference-to-pointer-to-base.
However, Defect Report 388 has been filed against this issue
(http://www.open-std.org/jtc1/sc22/wg21/docs/cwg_active.html#388) based
on the observation that many compilers have a different behaviour. The
defect has open status. Does anyone here have a view on what the
intended behaviour is in this case, or why the defect remains open?
---
[ 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.jamesd.demon.co.uk/csc/faq.html ]