New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LWG Poll 20: P1831R1 Deprecating volatile: library #3776
Conversation
source/future.tex
Outdated
Then each of the two templates shall satisfy | ||
the \tcode{UnaryTypeTrait} requirements | ||
with a base characteristic of \tcode{integral_constant<size_t, VS::value>}. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Bad wording
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see above
T operator @\placeholdernc{op}@=(T operand) volatile noexcept; | ||
T* fetch_@\placeholdernc{key}@(ptrdiff_t operand, memory_order order = memory_order::seq_cst) volatile noexcept; | ||
\end{codeblock} | ||
|
||
\rSec2[depr.atomics.nonmembers]{Non-member functions} | ||
|
||
\indexlibraryglobal{atomic_init}% |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second part of this change to [depr.atomics] is missing:
"The following non-member function is available when atomic::is_always_lock_free is false:"
I realize atomic_init was already deprecated, so maybe change the wording to say "For the volatile overload of this function, ..."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's the problem: The entirety of atomic_init is deprecated and the "volatile" part is double-deprecated. So the "If" reduces to "If true".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the inline comments,fetch_key
and operator op=
are missing constraints clauses in [atomics.types.pointer]. Same for atomic_init
in [depr.atomics.nonmembers] (was [atomics.nonmembers])
Regarding atomic_init, I think this is correct, because it's now all in [depr.atomics] where this paper also says "The following non-member function is available when atomics.types.pointer is fixed (but the resulting wording is wrong, because T is the pointee). |
@zygoloid, [atomics.types.pointer] says now "Constraints: For the |
7b1263e
to
2604894
Compare
Also fixes NB CZ 004, CA 210, and US 211 (C++20 CD). [depr.atomics.nonmembers] atomic_init was already deprecated, with and without volatile, so the Constraints: clause would haver no effect and was not added. [depr.tuple] Fix broken introductory sentence. [depr.variant] Fix missing introductory sentences. [depr.atomics.volatile] Clarify that "is available" is overriding the "Constraints:" clause. [depr.tuple] Rebase paper on recent changes: * tuple_size and tuple_element specializations are also available in the <span> header * replace "shall meet" / "shall satisfy" with "meets"
of is_always_lock_free.
2604894
to
a63805d
Compare
Also fixes NB CZ 004, CA 210, and US 211 (C++20 CD).
Fixes #3722 .
Fixes cplusplus/papers#589.
Fixes cplusplus/nbballot#4
Fixes cplusplus/nbballot#208.