cplusplus / nbballot

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

GB-129 33.5 [atomics] Avoid "integral" and "floating-point" placeholder in atomic and atomic_ref #438

Closed wg21bot closed 1 year ago

wg21bot commented 1 year ago

We define specializations std::atomic<integral> and std::atomic<floating-point>, and the corresponding ones for std::atomic_ref. The choice of placeholder names is confusing given that we now have std::integral and std::floating_point concepts. Either choose a different placeholder, e.g. Integral, or just re-specify them as partial specializations constrained using the appropriate concept. This would make them valid C++, not pseudo-code, and consistent with the partial specializations for pointers.

Change template<> struct atomic<integral> to template<integral T> struct atomic<T> and replace integral in the class body with "T" (which is already used for the member functions fetch_key and op=). Similarly for atomic<floating-point> and atomic_ref<integral> and atomic_ref<floating-point>.

JeffGarland commented 1 year ago

LWG in Kona: An editorial issue will be filed to rename to integral-type and floating-point-type to make it clear these are not the concept

JeffGarland commented 1 year ago

Notes from Kona: https://wiki.edg.com/bin/view/Wg21kona2022/LWG20221107-LA

tkoeppe commented 1 year ago

@jwakely: can I note the final disposition as "Accepted"? Or is it with modifications?

jwakely commented 1 year ago

I think with modifications, since my original suggestion to completely respecify them in terms of concepts was rejected in favour of an editorial fix.

tkoeppe commented 1 year ago

OK, I'll say "accepted with modifications", and you can review that part in the Editors' Report when we get to it.

jensmaurer commented 1 year ago

Accepted with modifications. The misleading placeholder names have been renamed.