This page is a snapshot from the LWG issues list, see theLibrary Active Issues List for more information and the meaning ofC++11 status.
Section: 17.9.8[except.nested]Status:C++11Submitter: Alisdair MeredithOpened: 2008-03-25Last modified: 2016-01-28
Priority:Not Prioritized
View all otherissues in [except.nested].
View all issues withC++11 status.
Discussion:
Looking at the wording I submitted forrethrow_if_nested, I don't think Igot it quite right.
The current wording says:
template <class E> void rethrow_if_nested(const E& e);Effects: Calls
e.rethrow_nested()only ifeis publicly derived fromnested_exception.
This is trying to be a bit subtle, by requiringe (notE) to be publiclyderived fromnested_exception the idea is that adynamic_cast would berequired to be sure. Unfortunately, ife is dynamically but not staticallyderived fromnested_exception,e.rethrow_nested() is ill-formed.
[San Francisco:]
Alisdair was volunteered to provide wording.
[2009-10 Santa Cruz:]
Leave as Open. Alisdair to provide wording.
[2009-11-09 Alisdair provided wording.]
[2010-03-10 Dietmar updated wording.]
[2010 Pittsburgh:]
Moved to Ready for Pittsburgh.
Proposed resolution:
Change 17.9.8[except.nested], p8:
template <class E> void rethrow_if_nested(const E& e);-8-Effects:
CallsOnly ifthe dynamic type ofe.rethrow_nested()oeispubliclyand unambiguously derived fromnested_exceptionthis callsdynamic_cast<const nested_exception&>(e).rethrow_nested().