|
3625 | 3625 | \end{itemize}
|
3626 | 3626 |
|
3627 | 3627 | \pnum
|
3628 |
| -If, after the lifetime of an object has ended and before the storage |
3629 |
| -which the object occupied is reused or released, a new object is created |
3630 |
| -at the storage location which the original object occupied, a pointer |
3631 |
| -that pointed to the original object, a reference that referred to the |
3632 |
| -original object, or the name of the original object will automatically |
3633 |
| -refer to the new object and, once the lifetime of the new object has |
3634 |
| -started, can be used to manipulate the new object, if |
3635 |
| -the original object is transparently replaceable (see below) |
3636 |
| -by the new object. |
3637 |
| -An object $o_1$ is \defn{transparently replaceable} |
3638 |
| -by an object $o_2$ if: |
| 3628 | +An object $o_1$ is \defn{transparently replaceable} by an object $o_2$ if: |
3639 | 3629 | \begin{itemize}
|
3640 | 3630 | \item the storage that $o_2$ occupies exactly overlays
|
3641 | 3631 | the storage that $o_1$ occupied, and
|
|
3652 | 3642 | $o_1$ and $o_2$ are direct subobjects of objects $p_1$ and $p_2$, respectively,
|
3653 | 3643 | and $p_1$ is transparently replaceable by $p_2$.
|
3654 | 3644 | \end{itemize}
|
| 3645 | + |
| 3646 | +\pnum |
| 3647 | +After the lifetime of an object has ended and before the storage which the |
| 3648 | +object occupied is reused or released, if a new object is created at the |
| 3649 | +storage location which the original object occupied and the original object was |
| 3650 | +transparently replaceable by the new object, a pointer that pointed to the |
| 3651 | +original object, a reference that referred to the original object, or the name |
| 3652 | +of the original object will automatically refer to the new object and, once the |
| 3653 | +lifetime of the new object has started, can be used to manipulate the new |
| 3654 | +object. |
| 3655 | + |
3655 | 3656 | \begin{example}
|
3656 | 3657 | \begin{codeblock}
|
3657 | 3658 | struct C {
|
|
0 commit comments