Section: 17.9.8 [except.nested] Status: C++11 Submitter: Alisdair Meredith Opened: 2008-03-25 Last modified: 2016-01-28
Priority: Not Prioritized
View all other issues in [except.nested].
View all issues with C++11 status.
Discussion:
Looking at the wording I submitted for rethrow_if_nested
, I don't think I
got it quite right.
The current wording says:
template <class E> void rethrow_if_nested(const E& e);Effects: Calls
e.rethrow_nested()
only ife
is publicly derived fromnested_exception
.
This is trying to be a bit subtle, by requiring e
(not E
) to be publicly
derived from nested_exception
the idea is that a dynamic_cast
would be
required to be sure. Unfortunately, if e
is dynamically but not statically
derived from nested_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 if the dynamic type ofe.rethrow_nested()
oe
is publicly and unambiguously derived fromnested_exception
this callsdynamic_cast<const nested_exception&>(e).rethrow_nested()
.