Skip to content

Commit e15c095

Browse files
committed
[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.
1 parent 77ca407 commit e15c095

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

source/exec.tex

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7648,27 +7648,27 @@
76487648
\begin{itemdescr}
76497649
\pnum
76507650
If there is no parameter with type \tcode{allocator_arg_t} then let
7651-
\tcode{\placeholder{alloc}} be \tcode{Allocator()}.
7652-
Let \tcode{\placeholder{arg_next}} be the parameter following the first
7653-
\tcode{allocator_arg_t} parameter (if any) and let \tcode{\placeholder{alloc}}
7654-
be \tcode{Allocator(\placeholder{arg_next})}.
7655-
Then \tcode{PAlloc} is \tcode{allocator_traits<Allocator>::template
7656-
re\-bind_alloc\brk{}<U>} where \tcode{U} is an unspecified type
7657-
whose size and alignment are both \tcode{__STDCPP_DEFAULT_NEW_ALIGNMENT__}.
7651+
\tcode{alloc} be \tcode{allocator_type()}.
7652+
Otherwise, let \tcode{arg_next} be the parameter
7653+
following the first \tcode{allocator_arg_t} parameter,
7654+
and let \tcode{alloc} be \tcode{allocator_type(arg_next)}.
7655+
Let \tcode{PAlloc} be \tcode{allocator_traits<allocator_type>::template
7656+
rebind_alloc<U>}, where \tcode{U} is an unspecified type
7657+
whose size and alignment are both \mname{STDCPP_DEFAULT_NEW_ALIGNMENT}.
76587658

76597659
\pnum
76607660
\mandates
76617661
\begin{itemize}
76627662
\item The first parameter of type \tcode{allocator_arg_t} (if any) is not the last parameter.
7663-
\item \tcode{Allocator(\placeholder{arg_next})} is a valid expression if there is a parameter
7663+
\item \tcode{allocator_type(arg_next)} is a valid expression if there is a parameter
76647664
of type \tcode{allocator_arg_t}.
76657665
\item \tcode{allocator_traits<PAlloc>::pointer} is a pointer type.
76667666
\end{itemize}
76677667

76687668
\pnum
76697669
\effects
76707670
Initializes an allocator \tcode{palloc} of type \tcode{PAlloc} with
7671-
\tcode{\placeholder{alloc}}.
7671+
\tcode{alloc}.
76727672
Uses \tcode{palloc} to allocate storage for the
76737673
smallest array of \tcode{U} sufficient to provide storage for a
76747674
coroutine state of size \tcode{size}, and unspecified additional

0 commit comments

Comments
 (0)