From 09a341f14afb2aa00d97a454b535e285fa2a58a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20K=C3=B6ppe?= Date: Wed, 30 Jul 2025 15:33:56 +0100 Subject: [PATCH] [task.promise] Fixes and clarifications in "operator new" spec * Change erroneous "Allocator" to "allocator_type". This was a mistake in the paper (a leftover from a previous revision). * Locally defined variables are just typeset as normal code, not as placeholders. * Some commas inserted to separate coordinate subclauses. * Replaced "(if any)" with leading "Oherwise", which seems better in order to avoid seemingly providing two conflicting definitions of alloc. * Replaced "Then PAlloc is ..." with "Let PAlloc be ...", which replaces the (causal vs temporal) ambiguous "then" with the far more common "let" expression. --- source/exec.tex | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/source/exec.tex b/source/exec.tex index bee455a1ea..92c01d1fbc 100644 --- a/source/exec.tex +++ b/source/exec.tex @@ -7648,19 +7648,19 @@ \begin{itemdescr} \pnum If there is no parameter with type \tcode{allocator_arg_t} then let -\tcode{\placeholder{alloc}} be \tcode{Allocator()}. -Let \tcode{\placeholder{arg_next}} be the parameter following the first -\tcode{allocator_arg_t} parameter (if any) and let \tcode{\placeholder{alloc}} -be \tcode{Allocator(\placeholder{arg_next})}. -Then \tcode{PAlloc} is \tcode{allocator_traits::template -re\-bind_alloc\brk{}} where \tcode{U} is an unspecified type -whose size and alignment are both \tcode{__STDCPP_DEFAULT_NEW_ALIGNMENT__}. +\tcode{alloc} be \tcode{allocator_type()}. +Otherwise, let \tcode{arg_next} be the parameter +following the first \tcode{allocator_arg_t} parameter, +and let \tcode{alloc} be \tcode{allocator_type(arg_next)}. +Let \tcode{PAlloc} be \tcode{allocator_traits::template +rebind_alloc}, where \tcode{U} is an unspecified type +whose size and alignment are both \mname{STDCPP_DEFAULT_NEW_ALIGNMENT}. \pnum \mandates \begin{itemize} \item The first parameter of type \tcode{allocator_arg_t} (if any) is not the last parameter. -\item \tcode{Allocator(\placeholder{arg_next})} is a valid expression if there is a parameter +\item \tcode{allocator_type(arg_next)} is a valid expression if there is a parameter of type \tcode{allocator_arg_t}. \item \tcode{allocator_traits::pointer} is a pointer type. \end{itemize} @@ -7668,7 +7668,7 @@ \pnum \effects Initializes an allocator \tcode{palloc} of type \tcode{PAlloc} with -\tcode{\placeholder{alloc}}. +\tcode{alloc}. Uses \tcode{palloc} to allocate storage for the smallest array of \tcode{U} sufficient to provide storage for a coroutine state of size \tcode{size}, and unspecified additional