Skip to content

Commit c755814

Browse files
committed
CWG2523 Undefined behavior via omitted destructor call in constant expressions
1 parent 8af88f7 commit c755814

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

source/basic.tex

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3409,8 +3409,11 @@
34093409
A \grammarterm{delete-expression}\iref{expr.delete} invokes the destructor
34103410
prior to releasing the storage.
34113411
\end{note}
3412-
In this case, the destructor is not implicitly invoked and any program that
3413-
depends on the side effects produced by the destructor has undefined behavior.
3412+
In this case, the destructor is not implicitly invoked.
3413+
\begin{note}
3414+
The correct behavior of a program often depends on
3415+
the destructor being invoked for each object of class type.
3416+
\end{note}
34143417

34153418
\pnum
34163419
Before the lifetime of an object has started but after the storage which

0 commit comments

Comments
 (0)