[atomic.ref.generic] Issues regarding P3323R1 #7556
Labels
lwg
Issue must be reviewed by LWG.
not-editorial
Issue is not deemed editorial; the editorial issue is kept open for tracking.
Issue 1: The paper adds this paragraph to multiple sections:
For the main template, it is OK, but there are issues with the (partial) specializations:
T
, sois_volatile_v<T>
cannot be well-formed.T
refers to the pointed-to type, testing whether it is volatile is definitely not the intention of the author.Issue 2: The paper adds this paragraph to [atomics.ref.pointer]:
This paragraph seems to identify the pointer specializations as explicit (full) specializations, but it is impossible to enumerate all pointer(-to-object) types. The wording also implies that pointer-to-function types should match the main template, which is currently not the case. Currently, pointer-to-function types match the partial specialization, and such specializations can invoke the member functions that are also provided in the main template (the additional operations are guarded by [atomics.ref.pointer] p6). We should not change this.
We should keep the partial specialization, and we need to redefine
atomic_ref<pointer-type>
to make use of the template parameterT
.Suggested resolution (I can file a PR if CWG agrees with this direction):
is_volatile_v<T>
withis_volatile_v<integral-type>
.is_volatile_v<T>
withis_volatile_v<floating-point-type>
.is_volatile_v<T>
withis_volatile_v<pointer-type>
.The text was updated successfully, but these errors were encountered: