Skip to content

Commit 8f3bc05

Browse files
committed
CWG2728 Evaluation of conversions in a delete-expression
1 parent 39b7d21 commit 8f3bc05

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
@@ -5778,22 +5778,15 @@
57785778
If the operand is of
57795779
class type, it is contextually implicitly converted\iref{conv}
57805780
to a pointer to object
5781-
type.
5782-
\begin{footnote}
5783-
This implies that an object
5784-
cannot be deleted using a pointer of type
5785-
\tcode{\keyword{void}*} because \keyword{void} is not an object type.
5786-
\end{footnote}
5781+
type
5782+
and the converted operand is used in place of the original operand
5783+
for the remainder of this subclause.
57875784
Otherwise, it shall be a prvalue of pointer to object type.
57885785
The \grammarterm{delete-expression} has type
57895786
\keyword{void}.
57905787

57915788
\pnum
57925789
\indextext{\idxcode{delete}!single-object}%
5793-
If the operand has a class type, the operand is converted to a pointer
5794-
type by calling the above-mentioned conversion function, and the
5795-
converted operand is used in place of the original operand for the
5796-
remainder of this subclause.
57975790
In a single-object delete expression, the value of the operand of
57985791
\keyword{delete} may be a null pointer value,
57995792
a pointer value
@@ -5837,10 +5830,6 @@
58375830
expression, if the dynamic type of the object to be deleted is not similar to
58385831
its static type, the behavior is undefined.
58395832

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

0 commit comments

Comments
 (0)