cplusplus / nbballot

Handling of NB comments in response to ballots
14 stars 4 forks source link

US355 Make atomic_ref<T>::notify_one/all const #351

Closed wg21bot closed 4 years ago

wg21bot commented 4 years ago

31.07 [atomics.ref.generic] 31.7.1 [atomics.ref.operations] 31.7.2 [atomics.ref.int] 31.7.3 [atomics.ref.float] 31.7.4 [atomics.ref.pointer]

atomic_ref<T>::notify_one and atomic_ref<T>::notify_all should be const member functions (in the generic class and all the specializations), since it is the atomic object that is (conceptually) modified, not the atomic_ref<T> object.

Proposed change: Make atomic_ref<T>::notify_one and atomic_ref<T>::notify_all const.

ogiroux commented 4 years ago

Recommend to make notify_one, notify_all, and operator=(float) of atomic_ref const, in response to US 358 and US 355: SF F N A SA Unanimous consent

tituswinters commented 4 years ago

LEWG in Belfast: We agree with SG1, forward to LWG for C++20.

jensmaurer commented 4 years ago

Accepted.