Created on 2023-08-30.00:00:00 last changed 8 months ago
Proposed resolution (approved by CWG 2023-10-06):
Change all of 7.6.2.7 [expr.unary.noexcept] as follows:
The noexcept operator determines whether the evaluation of its operand, which is an unevaluated operand (7.2.3 [expr.context]), can throw an exception (14.2 [except.throw]).noexcept-expression: noexcept ( expression )The operand of the noexcept operator is an unevaluated operand (7.2.3 [expr.context]). If the operand is a prvalue, the temporary materialization conversion (7.3.5 [conv.rval]) is applied.
The result of the noexcept operator is a prvalue of type bool. The result is false if the full-expression of the operand is potentially-throwing (14.5 [except.spec]), and true otherwise.
[Note 1: A noexcept-expression is an integral constant expression (7.7 [expr.const]). —end note]
If the operand is a prvalue, the temporary materialization conversion (7.3.5 [conv.rval]) is applied. The result of the noexcept operator is true unless the full-expression of the operand is potentially-throwing (14.5 [except.spec]).
[Accepted as a DR at the November, 2023 meeting.]
The introductory sentence "can throw an exception" is misleading, because it might be interpreted to cover exceptions thrown as the result of encountering undefined behavior.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-04-05 21:43:46 | admin | set | status: dr -> drwp |
2023-12-19 10:15:28 | admin | set | status: ready -> dr |
2023-12-02 15:54:05 | admin | set | status: tentatively ready -> ready |
2023-10-06 22:55:13 | admin | set | messages: + msg7450 |
2023-10-06 22:55:13 | admin | set | status: open -> tentatively ready |
2023-08-30 00:00:00 | admin | create |