Skip to content

Commit f47cbe4

Browse files
burblebeetkoeppe
authored andcommitted
CWG2728 Evaluation of conversions in a delete-expression
1 parent 0c6f5bc commit f47cbe4

File tree

1 file changed

+3
-14
lines changed

1 file changed

+3
-14
lines changed

source/expressions.tex

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5780,22 +5780,15 @@
57805780
If the operand is of
57815781
class type, it is contextually implicitly converted\iref{conv}
57825782
to a pointer to object
5783-
type.
5784-
\begin{footnote}
5785-
This implies that an object
5786-
cannot be deleted using a pointer of type
5787-
\tcode{\keyword{void}*} because \keyword{void} is not an object type.
5788-
\end{footnote}
5783+
type
5784+
and the converted operand is used in place of the original operand
5785+
for the remainder of this subclause.
57895786
Otherwise, it shall be a prvalue of pointer to object type.
57905787
The \grammarterm{delete-expression} has type
57915788
\keyword{void}.
57925789

57935790
\pnum
57945791
\indextext{\idxcode{delete}!single-object}%
5795-
If the operand has a class type, the operand is converted to a pointer
5796-
type by calling the above-mentioned conversion function, and the
5797-
converted operand is used in place of the original operand for the
5798-
remainder of this subclause.
57995792
In a single-object delete expression, the value of the operand of
58005793
\keyword{delete} may be a null pointer value,
58015794
a pointer value
@@ -5839,10 +5832,6 @@
58395832
expression, if the dynamic type of the object to be deleted is not similar to
58405833
its static type, the behavior is undefined.
58415834

5842-
\pnum
5843-
The \grammarterm{cast-expression} in a \grammarterm{delete-expression} shall
5844-
be evaluated exactly once.
5845-
58465835
\pnum
58475836
\indextext{type!incomplete}%
58485837
If the object being deleted has incomplete class type at the point of

0 commit comments

Comments
 (0)