Title
rethrow_if_nested
Status
c++11
Section
[except.nested]
Submitter
Alisdair Meredith

Created on 2008-03-25.00:00:00 last changed 154 months ago

Messages

Date: 2010-10-21.18:28:33

Proposed resolution:

Change [except.nested], p8:

template <class E> void rethrow_if_nested(const E& e);

-8- Effects: Calls e.rethrow_nested() oOnly if the dynamic type of e is publicly and unambiguously derived from nested_exception this calls dynamic_cast<const nested_exception&>(e).rethrow_nested().

Date: 2010-10-21.18:28:33

[ 2010 Pittsburgh: ]

Moved to Ready for Pittsburgh.

Date: 2010-03-10.00:00:00

[ 2010-03-10 Dietmar updated wording. ]

Date: 2009-11-09.00:00:00

[ 2009-11-09 Alisdair provided wording. ]

Date: 2010-10-21.18:28:33

[ 2009-10 Santa Cruz: ]

Leave as Open. Alisdair to provide wording.

Date: 2010-10-21.18:28:33

[ San Francisco: ]

Alisdair was volunteered to provide wording.

Date: 2008-03-25.00:00:00

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 if e is publicly derived from nested_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.

History
Date User Action Args
2011-08-23 20:07:26adminsetstatus: wp -> c++11
2010-10-21 18:28:33adminsetmessages: + msg3912
2010-10-21 18:28:33adminsetmessages: + msg3911
2010-10-21 18:28:33adminsetmessages: + msg3910
2010-10-21 18:28:33adminsetmessages: + msg3909
2010-10-21 18:28:33adminsetmessages: + msg3908
2010-10-21 18:28:33adminsetmessages: + msg3907
2008-03-25 00:00:00admincreate