From bf93c1814d4eb0774967efaa7ea4b29efc221a8f Mon Sep 17 00:00:00 2001 From: "A. Jiang" Date: Sat, 12 Aug 2023 17:10:33 +0800 Subject: [PATCH] [allocator.requirements.general] Fix the misuse of `launder` --- source/lib-intro.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/lib-intro.tex b/source/lib-intro.tex index 07501c7096..dd35fa9a28 100644 --- a/source/lib-intro.tex +++ b/source/lib-intro.tex @@ -2324,7 +2324,7 @@ but array elements are not constructed. \begin{example} When reusing storage denoted by some pointer value \tcode{p}, -\tcode{launder(reinterpret_cast(new (p) byte[n * sizeof(T)]))} +\tcode{start_lifetime_as_array(new (p) byte[n * sizeof(T)], n)} can be used to implicitly create a suitable array object and obtain a pointer to it. \end{example}