Skip to content

Commit

Permalink
[specialized.algorithms.general] Restore the note
Browse files Browse the repository at this point in the history
... 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]>
  • Loading branch information
frederick-vs-ja and jwakely committed Oct 20, 2024
1 parent a470ff8 commit 7f3b816
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11156,6 +11156,16 @@
are destroyed in an unspecified order
before allowing the exception to propagate.

\pnum
\begin{note}
When new objects are created by
the algorithms specified in \ref{specialized.algorithms},
the lifetime ends for any existing objects
(including potentially-overlapping subobjects \ref{intro.object})
in storage that is reused \ref{basic.life}.
Subsequent operations on these objects can result in undefined behavior.
\end{note}

\pnum
Some algorithms specified in \ref{specialized.algorithms}
make use of the exposition-only function template
Expand Down

0 comments on commit 7f3b816

Please sign in to comment.