Created on 2023-03-26.00:00:00 last changed 12 months ago
Proposed resolution (approved by CWG 2023-03-30):
Change in 7.6.18 [expr.throw] paragraph 2 as follows:
Evaluating a throw-expression with an operand throws an exception (14.2 [except.throw]); the type of the exception object is determined by removing any top-level cv-qualifiers from the static type of the operand and adjusting the type from “array of T” or function type T to “pointer to T”. The exception object is copy-initialized (9.4.1 [dcl.init.general]) from the operand.
Change in 14.2 [except.throw] paragraph 3 as follows:
Throwing an exceptioncopy-initializes(9.4 [dcl.init], 11.4.5.3 [class.copy.ctor])a temporary object, called the exception object. If the type of the exception 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 type other than cv void (6.8.4 [basic.compound]), the program is ill-formed.
[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 of issue 2699; approved by CWG 2023-06-12):
Change in 7.6.18 [expr.throw] paragraph 2 as follows:
Evaluating a throw-expression with an operand throws an exception (14.2 [except.throw]); the type of the exception object is determined by removing any top-level cv-qualifiers from the static type of the operand and adjusting the type from “array of T” or function type T to “pointer to T”. The exception object is copy-initialized (9.4.1 [dcl.init.general]) from the (possibly converted) operand.
Change in 14.2 [except.throw] paragraph 3 as follows:
Throwing an exceptioncopy-initializes(9.4 [dcl.init], 11.4.5.3 [class.copy.ctor])a temporary object, called the exception object. If the type of the exception 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 type other than cv void (6.8.4 [basic.compound]), the program is ill-formed.
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-12-19 10:15:28 | admin | set | status: dr -> drwp |
2023-07-16 13:00:43 | admin | set | status: ready -> dr |
2023-03-31 21:41:42 | admin | set | messages: + msg7241 |
2023-03-31 21:41:42 | admin | set | status: open -> ready |
2023-03-26 00:00:00 | admin | create |