CWG Issue 1166 (original) (raw)

This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 118e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.

2025-11-05


1166._exception-declaration_s that do not declare objects

Section: 14.4 [except.handle]Status: C++11Submitter: USDate: 2010-08-03

[Voted into the WP at the March, 2011 meeting as part of paper N3262.]

N3092 comment GB 45

According to 14.4 [except.handle] paragraph 16,

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.

This wording leaves unspecified how an _exception-declaration_that is a reference should be treated. For example, presumably a reference to an abstract class type should be permitted, but that is not specified. The treatment of ellipsis is also not clearly addressed.