Created on 2023-05-05.00:00:00 last changed 4 months ago
Proposed resolution (approved by CWG 2024-03-20):
Change in 7.6.2.9 [expr.delete] paragraph 1 and paragraph 2 as follows:
... The first alternative is a single-object delete expression, and the second is an array delete expression. Whenever the delete keyword is immediately followed by empty square brackets, it shall be interpreted as the second alternative. [ Footnote: ... ] If the operand is of class type, it is contextually implicitly converted (7.3 [conv]) to a pointer to object type and the converted operand is used in place of the original operand for the remainder of this subclause.
[ Footnote: ...]Otherwise, it shall be a prvalue of pointer to object type. 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....
Delete 7.6.2.9 [expr.delete] paragraph 4:
The cast-expression in a delete-expression shall be evaluated exactly once.
Proposed resolution (approved by CWG 2024-03-01) [SUPERSEDED]:
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.
[Accepted as a DR at the June, 2024 meeting.]
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.
History | |||
---|---|---|---|
Date | User | Action | Args |
2024-07-20 13:52:34 | admin | set | status: ready -> dr |
2024-06-26 19:00:47 | admin | set | status: tentatively ready -> ready |
2024-03-20 02:38:50 | admin | set | messages: + msg7645 |
2024-03-03 21:57:08 | admin | set | messages: + msg7624 |
2024-03-03 21:57:08 | admin | set | status: open -> tentatively ready |
2023-05-05 00:00:00 | admin | create |