This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 117a. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2025-04-13
[Accepted as a DR at the June, 2023 meeting.]
Neither 14.2 [except.throw] nor 7.6.18 [expr.throw]specifiy the source for copy-initializing the exception object.
Proposed resolution (based on the resolution ofissue 2699; approved by CWG2023-06-12):
Change in 7.6.18 [expr.throw] paragraph 2 as follows:
Evaluating athrow-expression with an operand throws anexception (14.2 [except.throw]); the type of the exceptionobject is determined by removing any top-levelcv-qualifiersfrom the static type of the operand and adjusting the type from“array of T” or function type T to “pointer toT”.The exception object is copy-initialized(9.5.1 [dcl.init.general]) from the (possibly converted) operand.
Change in 14.2 [except.throw] paragraph 3 as follows:
Throwing an exceptioncopy-initializes(9.5 [dcl.init], 11.4.5.3 [class.copy.ctor])a temporary object, called the exception object. If the type of theexception object would be an incomplete type(6.8.1 [basic.types.general]), an abstract class type(11.7.4 [class.abstract]), or a pointer to an incomplete typeother than cv void(6.8.4 [basic.compound]),the program is ill-formed.