- Title
- Incorrect treatment of exception-declarations
- Status
- c++11
- Section
- 14.4 [except.handle]
- Submitter
- Mike Miller
Created on 2009-09-28.00:00:00 last changed 152 months ago
Messages
Date: 2011-03-15.00:00:00
Proposed resolution (March, 2011): This issue is resolved by the resolution of
issue 1166 in paper N3262.
Date: 2026-07-25.21:52:10
The current wording of 14.4 [except.handle] paragraph 16 is: There are two problems with this. First, it's not clear what it
means for the handler's “parameter” to be a temporary.
This possibility is briefly mentioned in 6.8.7 [class.temporary],
but the lifetime of such a temporary is not defined there; the
discussion of lifetime is restricted to those temporaries that arise
during the evaluation of an expression, and this is not such a case. Second, this wording assumes that there will be an object to be
destroyed and thus ignores the possibility that the
exception-declaration declares a reference.
The object declared in an exception-declaration or, if the
exception-declaration does not specify a name, a temporary
(6.8.7 [class.temporary]) is copy-initialized (9.5 [dcl.init]) from the exception object. The object shall not have an
abstract class type. The object is destroyed when the handler exits,
after the destruction of any automatic objects initialized within the
handler.
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2014-03-03 00:00:00 | admin | set | status: fdis -> c++11 |
| 2011-04-10 00:00:00 | admin | set | messages: + msg3404 |
| 2011-04-10 00:00:00 | admin | set | status: open -> fdis |
| 2009-09-28 00:00:00 | admin | create | |