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

2023-01-15


1975. Permissible declarations for exception-specifications

Section: 14.5  [except.spec]     Status: CD4     Submitter: Richard Smith     Date: 2014-07-18

[Moved to DR at the October, 2015 meeting.]

The declarations in which an exception-specification may appear is not completely clear from the current wording of 14.5 [except.spec] paragraph 2.

Suggested resolution:

Change 14.5 [except.spec] paragraph 2 as follows:

An exception-specification shall appear only on a function declarator for a function type, pointer to function type, reference to function type, or pointer to member function type that is the top-level type of a declaration or definition of a function, variable, or non-static data member, or on such a type appearing as a parameter or return type in such a function declarator. An exception-specification shall not appear in a typedef declaration or alias-declaration. [Example:...

See also issues 2010, 1995, 1946, and 1798.

Proposed resolution (May, 2015):

Change 14.5 [except.spec] paragraph 2 as follows:

An exception-specification shall appear only on within a lambda-declarator or within a function declarator for a function type, pointer to function type, reference to function type, or pointer to member function type that is the top-level type of a declaration or definition, or on such a type appearing as a parameter or return type in a function declarator. An exception-specification shall not appear in a typedef declaration or alias-declaration. of a function, variable, or non-static data member. It shall appear only on the top-level declarator, on the declarator of one of its parameter-declarations (if any), or on its return type. [Example:...