Document number | P2045R0 |
Date | 2020-01-10 |
Project | Programming Language C++, Library Working Group |
Reply-to | Marshall Clow <mclow.lists@gmail.com> |
As the "Mandating the standard library" papers have progressed/been applied, a few bits have been missed; mostly because parts of the library have moved.
This paper fixes those bits.
Thanks to Richard Smith for enumerating these parts.
These changes are based on N4842.
In [tab:cpp17.allocator], change the "Requires" to an "Preconditions":
Preconditions:Requires: (*p).m
is well-defined.
Preconditions:Requires: (*q).m
is well-defined.
Preconditions:Requires: p
isshall be a value returned by an earlier call to allocate
that has not been invalidated by an intervening call to deallocate
. n
matchesshall match the value passed to allocate
to obtain this memory.
In [res.on.required]/1 add:
Violation of any preconditions specified in a function’s Preconditions: or Requires: element results in undefined behavior
In [coroutine.handle.con]/2, change the "Requires" to an "Preconditions":
Preconditions:Requires: p
is a reference to a promise object of a coroutine.
In [coroutine.handle.export.import]/2, change the "Requires" to an "Preconditions":
Preconditions:Requires: addr
was obtained via a prior call to address
In [coroutine.handle.observers]/2 and /4, change the "Requires" to an "Preconditions":
Preconditions:Requires: *this
refers to a suspended coroutine
Preconditions:Requires: *this
refers to a suspended coroutine
In [coroutine.handle.promise]/1, change the "Requires" to an "Preconditions":
Preconditions:Requires: *this
refers to a coroutine.
In [util.smartptr.atomic.shared]/3, /6, and /12, change the "Requires" to an "Preconditions":
Preconditions:Requires: order
is neither The order
argument shall not bememory_order::consume
, memory_order::acquire
, nor memory_order::acq_rel
.
Preconditions:Requires: order
is neithershall not be memory_order::release
nor memory_order::acq_rel
.
Preconditions:Requires: failure
is neithershall not be memory_order::release
nor memory_order::acq_rel
.
In [util.smartptr.atomic.weak]/6 and /12, change the "Requires" to an "Preconditions":
Preconditions:Requires: order is neithershall not be memory_order::release
nor memory_order::acq_rel
Preconditions:Requires: failure is neithershall not be memory_order::release
nor memory_order::acq_rel