Skip to content

Commit f82f32b

Browse files
[basic.life] Turn the normatively redundant paragraph into a note
1 parent 04b65ba commit f82f32b

File tree

1 file changed

+13
-14
lines changed

1 file changed

+13
-14
lines changed

source/basic.tex

+13-14
Original file line numberDiff line numberDiff line change
@@ -3622,22 +3622,21 @@
36223622
\end{note}
36233623

36243624
\pnum
3625-
If a program ends the lifetime of an object of type \tcode{T} with
3626-
static\iref{basic.stc.static}, thread\iref{basic.stc.thread},
3627-
or automatic\iref{basic.stc.auto}
3628-
storage duration and if \tcode{T} has a non-trivial destructor,
3625+
\begin{note}
3626+
If a program ends the lifetime of an object for which a destructor
3627+
will be called implicitly,
36293628
\begin{footnote}
3630-
That
3631-
is, an object for which a destructor will be called
3632-
implicitly---upon exit from the block for an object with
3633-
automatic storage duration, upon exit from the thread for an object with
3634-
thread storage duration, or upon exit from the program for an object
3635-
with static storage duration.
3629+
The destructor will be called upon exit from the block for an object with
3630+
automatic storage duration\iref{basic.stc.auto}, upon exit from the thread
3631+
for an object with thread storage duration\iref{basic.stc.thread}, or upon
3632+
exit from the program for an object with
3633+
static storage duration\iref{basic.stc.static}.
36363634
\end{footnote}
3637-
and another object of the original type does not occupy
3638-
that same storage location when the implicit destructor call takes
3639-
place, the behavior of the program is undefined. This is true
3640-
even if the block is exited with an exception.
3635+
and the object is not transparently replaceable by another object that is
3636+
within its lifetime when the implicit destructor call takes place,
3637+
the behavior of the program is undefined. This is true even if the block is
3638+
exited with an exception.
3639+
\end{note}
36413640
\begin{example}
36423641
\begin{codeblock}
36433642
class T { };

0 commit comments

Comments
 (0)