Skip to content

Commit

Permalink
[specialized.algorithms.general] Restore the note for potentially-ove…
Browse files Browse the repository at this point in the history
…rlapping objects and undefined behavior (#7326)

The original note was incorrect and removed (see #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.
  • Loading branch information
frederick-vs-ja authored Oct 21, 2024
1 parent 5a87a8f commit 0451d08
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions source/algorithms.tex
Original file line number Diff line number Diff line change
Expand Up @@ -11156,6 +11156,15 @@
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}.
\end{note}

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

0 comments on commit 0451d08

Please # to comment.