Skip to content

Commit 23b36a4

Browse files
authored
[basic.life] Remove a partial repetition of the end-of-lifetime rules (#4894)
1 parent 42bb140 commit 23b36a4

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

source/basic.tex

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3383,16 +3383,14 @@
33833383
\end{note}
33843384

33853385
\pnum
3386-
A program may end the lifetime of any object by reusing the storage
3387-
which the object occupies or by explicitly calling a destructor
3388-
or pseudo-destructor\iref{expr.prim.id.dtor} for the object.
3389-
For an object of a class type, the program is not required to
3390-
call the destructor explicitly before the storage which the object
3391-
occupies is reused or released; however, if there is no explicit call to
3392-
the destructor or if a \grammarterm{delete-expression}\iref{expr.delete}
3393-
is not used to release the storage, the destructor is not
3394-
implicitly called and any program that depends on the side effects
3395-
produced by the destructor has undefined behavior.
3386+
A program may end the lifetime of an object of class type without invoking the
3387+
destructor, by reusing or releasing the storage as described above.
3388+
\begin{note}
3389+
A \grammarterm{delete-expression}\iref{expr.delete} invokes the destructor
3390+
prior to releasing the storage.
3391+
\end{note}
3392+
In this case, the destructor is not implicitly invoked and any program that
3393+
depends on the side effects produced by the destructor has undefined behavior.
33963394

33973395
\pnum
33983396
Before the lifetime of an object has started but after the storage which

0 commit comments

Comments
 (0)