1. Abstract
All of the changes that resulted from NB comments reviewed by SG1 in Belfast that are not already covered by existing papers.
2. US355
2.1. Poll
Recommend to make notify_one, notify_all, and operator=(float) of atomic_ref const, in response to US 358 and US 355: Unanimous consent
2.2. Wording
Change all the declarations of member functions
and
in class
to be
.
In 31.7 "Class template
" [atomics.ref.generic] near the end of the class synopsis:
void notify_one () const noexcept ; void notify_all () const noexcept ;
In 31.7.1 "Operations" [atomics.ref.ops] near the end of the list of functions:
void notify_one () const noexcept ; [ ... skip ... ]
void notify_one () const noexcept ;
In 31.7.2 "Specializations for integral types" [atomics.ref.int] near the end of the class synopsis:
void notify_one () const noexcept ; void notify_all () const noexcept ;
In 31.7.3 "Specializations for floating-point types" [atomics.ref.float] near the end of the class synopsis:
void notify_one () const noexcept ; void notify_all () const noexcept ;
In 31.7.4 "Partial specializations for pointers" [atomics.ref.pointer] near the end of the class synopsis:
void notify_one () const noexcept ; void notify_all () const noexcept ;
3. US358
3.1. Poll
Recommend to make notify_one, notify_all, and operator=(float) of atomic_ref const, in response to US 358 and US 355: Unanimous consent
3.2. Wording
In 31.7.3 "Specializations for floating-point types" [atomics.ref.float] near the middle of the class synopsis:
floating - point operator = ( floating - point ) const noexcept ;
4. US359
4.1. Poll
Recommend adopting the comment’s proposed wording (i.e. ignoring the alternative), in response to US 359:
Unanimous consent
LWG recommended using
as the return type, and making the same change to the identical wording in
.
4.2. Wording
Change 31.7.5 "Member operators common to integers and pointers to objects" [atomics.ref.memop] as follows:
T *
value_type operator ++ ( int ) const noexcept ; Effects: Equivalent to
return fetch_add ( 1 );
T *
value_type operator -- ( int ) const noexcept ; Effects: Equivalent to
return fetch_sub ( 1 );
T *
value_type operator ++ () const noexcept ; Effects: Equivalent to
return fetch_add ( 1 ) + 1 ;
T *
value_type operator -- ( int ) const noexcept ; Effects: Equivalent to
return fetch_sub ( 1 ) - 1 ;
Change 31.8.5 "Member operators common to integers and pointers to objects" [atomics.types.memop] as follows:
T
value_type operator ++ ( int ) volatile noexcept ;
T
value_type operator ++ ( int ) noexcept ; Effects: Equivalent to
return fetch_add ( 1 );
T
value_type operator -- ( int ) volatile noexcept ;
T
value_type operator -- ( int ) noexcept ; Effects: Equivalent to
return fetch_sub ( 1 );
T
value_type operator ++ () volatile noexcept ;
T
value_type operator ++ () noexcept ; Effects: Equivalent to
return fetch_add ( 1 ) + 1 ;
T
value_type operator -- () volatile noexcept ;
T
value_type operator -- () noexcept ; Effects: Equivalent to
return fetch_sub ( 1 ) - 1 ;
5. US356
5.1. Polls
Recommend removing the instance-dependence of atomic_ref
Consensus for change.
Recommend adding an instance-dependent atomic_ref
Not consensus for change in an NB ballot process
Recommend making atomic_ref
Not consensus for change in an NB ballot process
5.2. Wording
Change the specification of
in 31.7.1 "Operations" [atomics.ref.ops] p4:
bool is_lock_free () const noexcept ; Returns:
true
ifthe object’soperations on all objects of the typeare lock-free,
atomic_ref < T > false
otherwise.
6. US364
6.1. Poll
No object to unanimous consent to adopting the wording in this paper as the resolution to US364.
6.2. Wording
Change the specification of
in 32.7.2 "Class template
" [thread.sema.cnt] as follows:
bool try_acquire () noexcept ; Effects:
With low probability, returns immediately. An implementation should ensure that
does not consistently return
try_acquire false
in the absence of contending acquisitions.Otherwise, atomically check whether
is greater than zero and, if so, decrement
counter by one.
counter Effects: Attempts to atomically decrementif it is positive, without blocking. If
counter is not decremented, there is no effect and
counter immediately returns. An implementation may fail to decrement
try_acquire even if it is positive. [ Note: This spurious failure is normally uncommon, but allows interesting implementations based on a simple compare and exchange ([atomic]). -- end note] An implementation should ensure that
counter does not consistently return
try_acquire false
in the absence of contending semaphore operations.Returns:
true
ifwas decremented, otherwise
counter false
.