Skip to content
Open
Changes from all 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
19 changes: 15 additions & 4 deletions source/basic.tex
Original file line number Diff line number Diff line change
Expand Up @@ -3660,6 +3660,13 @@
lifetime of the new object has started, can be used to manipulate the new
object.

\begin{note}
Additionally, if the requirements in \ref{intro.object}
for the creation of subobjects are met,
once the lifetime of the new object has started,
the containing object of the original object
can be used to manipulate the new object.
\end{note}
\begin{example}
\begin{codeblock}
struct C {
Expand All @@ -3677,10 +3684,14 @@
return *this;
}

C c1;
C c2;
c1 = c2; // well-defined
c1.f(); // well-defined; \tcode{c1} refers to a new object of type \tcode{C}
void g() {
C c1;
C c2;
c1 = c2; // well-defined
c1.f(); // well-defined; \tcode{c1} refers to a new object of type \tcode{C}
new (&c1.i) int(42); // well-defined
int j = c1.i; // well-defined
}
\end{codeblock}
\end{example}
\begin{note}
Expand Down
Loading