Skip to content

Commit

Permalink
[basic.life] Reflow text defining transparently replaceable
Browse files Browse the repository at this point in the history
p8 is difficult to read as it defines transparently replaceable
only after it has made all use of it.  The edit pulls the
definition of transparently replaceable into its own preceding
paragraph, and then simplifies the sentence that uses this term.
  • Loading branch information
AlisdairM authored and tkoeppe committed Apr 16, 2024
1 parent 1b4e474 commit 59d6bfc
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions source/basic.tex
Expand Up @@ -3625,17 +3625,7 @@
\end{itemize}

\pnum
If, after the lifetime of an object has ended and before the storage
which the object occupied is reused or released, a new object is created
at the storage location which the original object occupied, a pointer
that pointed to the original object, a reference that referred to the
original object, or the name of the original object will automatically
refer to the new object and, once the lifetime of the new object has
started, can be used to manipulate the new object, if
the original object is transparently replaceable (see below)
by the new object.
An object $o_1$ is \defn{transparently replaceable}
by an object $o_2$ if:
An object $o_1$ is \defn{transparently replaceable} by an object $o_2$ if:
\begin{itemize}
\item the storage that $o_2$ occupies exactly overlays
the storage that $o_1$ occupied, and
Expand All @@ -3652,6 +3642,17 @@
$o_1$ and $o_2$ are direct subobjects of objects $p_1$ and $p_2$, respectively,
and $p_1$ is transparently replaceable by $p_2$.
\end{itemize}

\pnum
After the lifetime of an object has ended and before the storage which the
object occupied is reused or released, if a new object is created at the
storage location which the original object occupied and the original object was
transparently replaceable by the new object, a pointer that pointed to the
original object, a reference that referred to the original object, or the name
of the original object will automatically refer to the new object and, once the
lifetime of the new object has started, can be used to manipulate the new
object.

\begin{example}
\begin{codeblock}
struct C {
Expand Down

0 comments on commit 59d6bfc

Please sign in to comment.