From 0451d08aefd5318254d7d204ad45700aa4d5a2e7 Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Mon, 21 Oct 2024 19:45:10 +0800 Subject: [PATCH] [specialized.algorithms.general] Restore the note for potentially-overlapping 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. --- source/algorithms.tex | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/algorithms.tex b/source/algorithms.tex index a8c3809b34..d723b7e11a 100644 --- a/source/algorithms.tex +++ b/source/algorithms.tex @@ -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