|
3622 | 3622 | \end{note}
|
3623 | 3623 |
|
3624 | 3624 | \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, |
3629 | 3628 | \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}. |
3636 | 3634 | \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} |
3641 | 3640 | \begin{example}
|
3642 | 3641 | \begin{codeblock}
|
3643 | 3642 | class T { };
|
|
0 commit comments