You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue description: The drafting note for CWG 1354 says that noexcept(A()) requires the destructor of A to be accessible and non-deleted, which seems to imply that the temporary materialization conversion is applied to the prvalue A(). However, while the resolution to CWG 1354 undoubtedly requires the destruction of temporaries created within an unevaluated operand, there is no normative wording that requires the temporary materialization conversion to be performed on the operand of noexcept. In contrast, there is already normative wording stating that the operands of sizeof and typeid are subject to the temporary materialization conversion, and that the operand of decltype is not.
If the operand is a prvalue, the temporary materialization conversion ([conv.rval]) is applied. The result of the noexcept operator is true unless the expression (including any temporary materialization conversion) is potentially-throwing ([except.spec]).
The text was updated successfully, but these errors were encountered:
jensmaurer
changed the title
[expr.unary.noexcept] Specification of noexcept operator is still unclear about temporary materialization conversion
CWG2722 [expr.unary.noexcept] Specification of noexcept operator is still unclear about temporary materialization conversion
Apr 24, 2023
Full name of submitter: Brian Bi
Reference (section label): [expr.unary.noexcept]
Issue description: The drafting note for CWG 1354 says that
noexcept(A())
requires the destructor ofA
to be accessible and non-deleted, which seems to imply that the temporary materialization conversion is applied to the prvalueA()
. However, while the resolution to CWG 1354 undoubtedly requires the destruction of temporaries created within an unevaluated operand, there is no normative wording that requires the temporary materialization conversion to be performed on the operand ofnoexcept
. In contrast, there is already normative wording stating that the operands ofsizeof
andtypeid
are subject to the temporary materialization conversion, and that the operand ofdecltype
is not.Suggested resolution: Edit [expr.unary.noexcept]/3:
The text was updated successfully, but these errors were encountered: