Skip to content

Commit 9112c6a

Browse files
Aaron Ballmanzygoloid
authored andcommitted
Use the terms "single-object delete expression" and
"array delete expression" as definitions, removing the italics when not appropriate.
1 parent b3b8a19 commit 9112c6a

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
@@ -4220,11 +4220,13 @@
42204220
\terminal{::}\opt{} \terminal{delete [ ]} cast-expression
42214221
\end{bnf}
42224222

4223-
The first alternative is for non-array objects, and the second is for arrays. Whenever
4224-
the \tcode{delete} keyword is immediately followed by empty square brackets, it shall be
4225-
interpreted as the second alternative.\footnote{A lambda expression with a
4226-
\grammarterm{lambda-introducer} that consists of
4227-
empty square brackets can follow the \tcode{delete} keyword if the lambda expression is
4223+
The first alternative is a
4224+
\defnx{single-object delete expression}{delete!single-object}, and the
4225+
second is an \defnx{array delete expression}{delete!array}.
4226+
Whenever the \tcode{delete} keyword is immediately followed by empty square
4227+
brackets, it shall be interpreted as the second alternative.\footnote{A lambda
4228+
expression with a \grammarterm{lambda-introducer} that consists of empty square
4229+
brackets can follow the \tcode{delete} keyword if the lambda expression is
42284230
enclosed in parentheses.}
42294231
The operand shall be of pointer to object type or of class type. If of
42304232
class type, the operand is contextually implicitly converted\iref{conv}
@@ -4236,23 +4238,20 @@
42364238
\tcode{void}.
42374239

42384240
\pnum
4239-
\indextext{\idxcode{delete}!object}%
4241+
\indextext{\idxcode{delete}!single-object}%
42404242
If the operand has a class type, the operand is converted to a pointer
42414243
type by calling the above-mentioned conversion function, and the
42424244
converted operand is used in place of the original operand for the
42434245
remainder of this subclause.
4244-
In the first alternative
4245-
(\defnx{delete object}{object!delete}), the value of the operand of \tcode{delete} may
4246-
be a null pointer value, a pointer to a non-array object
4246+
In a single-object delete expression, the value of the operand of
4247+
\tcode{delete} may be a null pointer value, a pointer to a non-array object
42474248
created by a previous \grammarterm{new-expression},
42484249
or a pointer to a
42494250
subobject\iref{intro.object} representing a base class of such an
42504251
object\iref{class.derived}. If not, the behavior is undefined.
42514252
\indextext{array!\idxcode{delete}}%
4252-
In the second alternative (\defnx{delete array}{\idxcode{delete}!array}), the value of the
4253-
operand of \tcode{delete}
4254-
may be a null pointer value or a pointer value
4255-
that resulted from
4253+
In an array delete expression, the value of the operand of \tcode{delete}
4254+
may be a null pointer value or a pointer value that resulted from
42564255
a previous array \grammarterm{new-expression}.\footnote{For nonzero-length
42574256
arrays, this is the same as a pointer to the first
42584257
element of the array created by that \grammarterm{new-expression}.
@@ -4272,12 +4271,12 @@
42724271

42734272
\pnum
42744273
\indextext{\idxcode{delete}!undefined}%
4275-
In the first alternative (\term{delete object}), if the static type of
4276-
the object to be deleted is different from its dynamic type, the static type shall be
4277-
a base class of the dynamic type of the object to be deleted and the static type shall
4278-
have a virtual destructor or the behavior is undefined. In the second
4279-
alternative (\term{delete array}) if the dynamic type of the object to
4280-
be deleted differs from its static type, the behavior is undefined.
4274+
In a single-object delete expression, if the static type of the object to be
4275+
deleted is different from its dynamic type, the static type shall be a base
4276+
class of the dynamic type of the object to be deleted and the static type shall
4277+
have a virtual destructor or the behavior is undefined. In an array delete
4278+
expression, if the dynamic type of the object to be deleted differs from its
4279+
static type, the behavior is undefined.
42814280

42824281
\pnum
42834282
The \grammarterm{cast-expression} in a \grammarterm{delete-expression} shall
@@ -4382,9 +4381,9 @@
43824381
\pnum
43834382
When a \grammarterm{delete-expression}
43844383
is executed, the selected deallocation function shall be called with
4385-
the address of the most-derived object in the \term{delete object} case, or
4386-
the address of the object suitably adjusted for
4387-
the array allocation overhead\iref{expr.new} in the \term{delete array} case,
4384+
the address of the most-derived object in a single-object delete expression, or
4385+
the address of the object suitably adjusted for the array allocation
4386+
overhead\iref{expr.new} in an array delete expression,
43884387
as its first argument.
43894388
If a deallocation function
43904389
with a parameter of type \tcode{std::align_val_t}

0 commit comments

Comments
 (0)