Skip to content

[basic.life] Remove a partial repetition of the end-of-lifetime rules #4894

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 21, 2021
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3318,7 +3318,7 @@
and except as described in \ref{allocator.members}.
The lifetime of an object \placeholder{o} of type \tcode{T} ends when:
\begin{itemize}
\item if \tcode{T} is a non-class type, the object is destroyed, or
\item if \tcode{T} is a non-class type, the object is destroyed or pseudo-destroyed\iref{expr.prim.id.dtor}, or
\item if \tcode{T} is a class type, the destructor call starts, or
\item the storage which the object occupies is released,
or is reused by an object that is not nested within \placeholder{o}\iref{intro.object}.
Expand Down Expand Up @@ -3350,9 +3350,7 @@
\end{note}

\pnum
A program may end the lifetime of any object by reusing the storage
which the object occupies or by explicitly calling a destructor
or pseudo-destructor\iref{expr.prim.id.dtor} for the object.
A program may end the lifetime of any object as described above.
For an object of a class type, the program is not required to
call the destructor explicitly before the storage which the object
occupies is reused or released; however, if there is no explicit call to
Expand Down