Created on 2023-08-30.00:00:00 last changed 3 weeks ago
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.
Possible resolution:
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]).
History | |||
---|---|---|---|
Date | User | Action | Args |
2023-08-30 00:00:00 | admin | create |