Skip to content

Commit 0451d08

Browse files
[specialized.algorithms.general] Restore the note for potentially-overlapping objects and undefined behavior (cplusplus#7326)
The original note was incorrect and removed (see cplusplus#6157). But it turns out that _some_ note is still helpful. This PR tries to find the right way to describe storage reusing and potential subsequent undefined behavior.
1 parent 5a87a8f commit 0451d08

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

source/algorithms.tex

+9
Original file line numberDiff line numberDiff line change
@@ -11156,6 +11156,15 @@
1115611156
are destroyed in an unspecified order
1115711157
before allowing the exception to propagate.
1115811158

11159+
\pnum
11160+
\begin{note}
11161+
When new objects are created by
11162+
the algorithms specified in \ref{specialized.algorithms},
11163+
the lifetime ends for any existing objects
11164+
(including potentially-overlapping subobjects \ref{intro.object})
11165+
in storage that is reused \ref{basic.life}.
11166+
\end{note}
11167+
1115911168
\pnum
1116011169
Some algorithms specified in \ref{specialized.algorithms}
1116111170
make use of the exposition-only function template

0 commit comments

Comments
 (0)