Skip to content

Commit e8c62be

Browse files
author
Aaron Ballman
committed
Use the terms "single-object delete expression" and
"array delete expression" as definitions, removing the italics when not appropriate.
1 parent 27331fd commit e8c62be

File tree

1 file changed

+21
-22
lines changed

1 file changed

+21
-22
lines changed

source/expressions.tex

Lines changed: 21 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3993,11 +3993,13 @@
39933993
\terminal{::}\opt{} \terminal{delete [ ]} cast-expression
39943994
\end{bnf}
39953995

3996-
The first alternative is for non-array objects, and the second is for arrays. Whenever
3997-
the \tcode{delete} keyword is immediately followed by empty square brackets, it shall be
3998-
interpreted as the second alternative.\footnote{A lambda expression with a
3999-
\grammarterm{lambda-introducer} that consists of
4000-
empty square brackets can follow the \tcode{delete} keyword if the lambda expression is
3996+
The first alternative is a
3997+
\defnx{single-object delete expression}{delete!single-object}, and the
3998+
second is an \defnx{array delete expression}{delete!array}.
3999+
Whenever the \tcode{delete} keyword is immediately followed by empty square
4000+
brackets, it shall be interpreted as the second alternative.\footnote{A lambda
4001+
expression with a \grammarterm{lambda-introducer} that consists of empty square
4002+
brackets can follow the \tcode{delete} keyword if the lambda expression is
40014003
enclosed in parentheses.}
40024004
The operand shall be of pointer to object type or of class type. If of
40034005
class type, the operand is contextually implicitly converted\iref{conv}
@@ -4009,23 +4011,20 @@
40094011
\tcode{void}.
40104012

40114013
\pnum
4012-
\indextext{\idxcode{delete}!object}%
4014+
\indextext{\idxcode{delete}!single-object}%
40134015
If the operand has a class type, the operand is converted to a pointer
40144016
type by calling the above-mentioned conversion function, and the
40154017
converted operand is used in place of the original operand for the
40164018
remainder of this section.
4017-
In the first alternative
4018-
(\defnx{delete object}{object!delete}), the value of the operand of \tcode{delete} may
4019-
be a null pointer value, a pointer to a non-array object
4019+
In a single-object delete expression, the value of the operand of
4020+
\tcode{delete} may be a null pointer value, a pointer to a non-array object
40204021
created by a previous \grammarterm{new-expression},
40214022
or a pointer to a
40224023
subobject\iref{intro.object} representing a base class of such an
40234024
object\iref{class.derived}. If not, the behavior is undefined.
40244025
\indextext{array!\idxcode{delete}}%
4025-
In the second alternative (\defnx{delete array}{\idxcode{delete}!array}), the value of the
4026-
operand of \tcode{delete}
4027-
may be a null pointer value or a pointer value
4028-
that resulted from
4026+
In an array delete expression, the value of the operand of \tcode{delete}
4027+
may be a null pointer value or a pointer value that resulted from
40294028
a previous array \grammarterm{new-expression}.\footnote{For nonzero-length
40304029
arrays, this is the same as a pointer to the first
40314030
element of the array created by that \grammarterm{new-expression}.
@@ -4045,12 +4044,12 @@
40454044

40464045
\pnum
40474046
\indextext{\idxcode{delete}!undefined}%
4048-
In the first alternative (\term{delete object}), if the static type of
4049-
the object to be deleted is different from its dynamic type, the static type shall be
4050-
a base class of the dynamic type of the object to be deleted and the static type shall
4051-
have a virtual destructor or the behavior is undefined. In the second
4052-
alternative (\term{delete array}) if the dynamic type of the object to
4053-
be deleted differs from its static type, the behavior is undefined.
4047+
In a single-object delete expression, if the static type of the object to be
4048+
deleted is different from its dynamic type, the static type shall be a base
4049+
class of the dynamic type of the object to be deleted and the static type shall
4050+
have a virtual destructor or the behavior is undefined. In an array delete
4051+
expression, if the dynamic type of the object to be deleted differs from its
4052+
static type, the behavior is undefined.
40544053

40554054
\pnum
40564055
The \grammarterm{cast-expression} in a \grammarterm{delete-expression} shall
@@ -4155,9 +4154,9 @@
41554154
\pnum
41564155
When a \grammarterm{delete-expression}
41574156
is executed, the selected deallocation function shall be called with
4158-
the address of the most-derived object in the \term{delete object} case, or
4159-
the address of the object suitably adjusted for
4160-
the array allocation overhead\iref{expr.new} in the \term{delete array} case,
4157+
the address of the most-derived object in a single-object delete expression, or
4158+
the address of the object suitably adjusted for the array allocation
4159+
overhead\iref{expr.new} in an array delete expression,
41614160
as its first argument.
41624161
If a deallocation function
41634162
with a parameter of type \tcode{std::align_val_t}

0 commit comments

Comments
 (0)