This is an unofficial snapshot of the ISO/IEC JTC1 SC22 WG21 Core Issues List revision 112e. See http://www.open-std.org/jtc1/sc22/wg21/ for the official list.
2023-12-02
Subclause 7.6.2.9 [expr.delete] paragraph 4 specifies:
The cast-expression in a delete-expression shall be evaluated exactly once.
Due to the reference to the syntactic non-terminal cast-expression, it is unclear whether that includes the conversion to pointer type specified in 7.6.2.9 [expr.delete] paragraph 2.
Possible resolution:
Change in 7.6.2.9 [expr.delete] paragraph 1 and paragraph 2 as follows:
... The operand shall be of class type or a prvalue of pointer to object type
or of class type. If of class type, the operand is contextually implicitly converted (7.3 [conv]) to a prvalue pointer to object type. [ Footnote: ... ] The converted operand is used in place of the original operand for the remainder of this subclause. The delete-expression has type void.
If the operand has a class type, the operand is converted to a pointer type by calling the above-mentioned conversion function, and the converted operand is used in place of the original operand for the remainder of this subclause....
Change in 7.6.2.9 [expr.delete] paragraph 4 as follows:
Thecast-expression inoperand of a delete-expression shall be evaluated exactly once.