Skip to content

Commit a0807db

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 e3f9c32 commit a0807db

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
@@ -4136,11 +4136,13 @@
41364136
\terminal{::}\opt{} \terminal{delete [ ]} cast-expression
41374137
\end{bnf}
41384138

4139-
The first alternative is for non-array objects, and the second is for arrays. Whenever
4140-
the \tcode{delete} keyword is immediately followed by empty square brackets, it shall be
4141-
interpreted as the second alternative.\footnote{A lambda expression with a
4142-
\grammarterm{lambda-introducer} that consists of
4143-
empty square brackets can follow the \tcode{delete} keyword if the lambda expression is
4139+
The first alternative is a
4140+
\defnx{single-object delete expression}{delete!single-object}, and the
4141+
second is an \defnx{array delete expression}{delete!array}.
4142+
Whenever the \tcode{delete} keyword is immediately followed by empty square
4143+
brackets, it shall be interpreted as the second alternative.\footnote{A lambda
4144+
expression with a \grammarterm{lambda-introducer} that consists of empty square
4145+
brackets can follow the \tcode{delete} keyword if the lambda expression is
41444146
enclosed in parentheses.}
41454147
The operand shall be of pointer to object type or of class type. If of
41464148
class type, the operand is contextually implicitly converted\iref{conv}
@@ -4152,23 +4154,20 @@
41524154
\tcode{void}.
41534155

41544156
\pnum
4155-
\indextext{\idxcode{delete}!object}%
4157+
\indextext{\idxcode{delete}!single-object}%
41564158
If the operand has a class type, the operand is converted to a pointer
41574159
type by calling the above-mentioned conversion function, and the
41584160
converted operand is used in place of the original operand for the
41594161
remainder of this subclause.
4160-
In the first alternative
4161-
(\defnx{delete object}{object!delete}), the value of the operand of \tcode{delete} may
4162-
be a null pointer value, a pointer to a non-array object
4162+
In a single-object delete expression, the value of the operand of
4163+
\tcode{delete} may be a null pointer value, a pointer to a non-array object
41634164
created by a previous \grammarterm{new-expression},
41644165
or a pointer to a
41654166
subobject\iref{intro.object} representing a base class of such an
41664167
object\iref{class.derived}. If not, the behavior is undefined.
41674168
\indextext{array!\idxcode{delete}}%
4168-
In the second alternative (\defnx{delete array}{\idxcode{delete}!array}), the value of the
4169-
operand of \tcode{delete}
4170-
may be a null pointer value or a pointer value
4171-
that resulted from
4169+
In an array delete expression, the value of the operand of \tcode{delete}
4170+
may be a null pointer value or a pointer value that resulted from
41724171
a previous array \grammarterm{new-expression}.\footnote{For nonzero-length
41734172
arrays, this is the same as a pointer to the first
41744173
element of the array created by that \grammarterm{new-expression}.
@@ -4188,12 +4187,12 @@
41884187

41894188
\pnum
41904189
\indextext{\idxcode{delete}!undefined}%
4191-
In the first alternative (\term{delete object}), if the static type of
4192-
the object to be deleted is different from its dynamic type, the static type shall be
4193-
a base class of the dynamic type of the object to be deleted and the static type shall
4194-
have a virtual destructor or the behavior is undefined. In the second
4195-
alternative (\term{delete array}) if the dynamic type of the object to
4196-
be deleted differs from its static type, the behavior is undefined.
4190+
In a single-object delete expression, if the static type of the object to be
4191+
deleted is different from its dynamic type, the static type shall be a base
4192+
class of the dynamic type of the object to be deleted and the static type shall
4193+
have a virtual destructor or the behavior is undefined. In an array delete
4194+
expression, if the dynamic type of the object to be deleted differs from its
4195+
static type, the behavior is undefined.
41974196

41984197
\pnum
41994198
The \grammarterm{cast-expression} in a \grammarterm{delete-expression} shall
@@ -4298,9 +4297,9 @@
42984297
\pnum
42994298
When a \grammarterm{delete-expression}
43004299
is executed, the selected deallocation function shall be called with
4301-
the address of the most-derived object in the \term{delete object} case, or
4302-
the address of the object suitably adjusted for
4303-
the array allocation overhead\iref{expr.new} in the \term{delete array} case,
4300+
the address of the most-derived object in a single-object delete expression, or
4301+
the address of the object suitably adjusted for the array allocation
4302+
overhead\iref{expr.new} in an array delete expression,
43044303
as its first argument.
43054304
If a deallocation function
43064305
with a parameter of type \tcode{std::align_val_t}

0 commit comments

Comments
 (0)