Skip to content

Commit 7f3b816

Browse files
[specialized.algorithms.general] Restore the note
... for potentially-overlapping objects and undefined behavior. The original note was incorrect and removed. 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. Co-authored-by: Jonathan Wakely <[email protected]>
1 parent a470ff8 commit 7f3b816

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

source/algorithms.tex

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11156,6 +11156,16 @@
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+
Subsequent operations on these objects can result in undefined behavior.
11167+
\end{note}
11168+
1115911169
\pnum
1116011170
Some algorithms specified in \ref{specialized.algorithms}
1116111171
make use of the exposition-only function template

0 commit comments

Comments
 (0)