-
Notifications
You must be signed in to change notification settings - Fork 10
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
Change set_value
CPO to use member functions instead of tag_invoke
#1295
Conversation
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferencesCodacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more |
0c7113d
to
561c629
Compare
561c629
to
67a1976
Compare
67a1976
to
c244be8
Compare
…ber-function" This reverts commit 36f287a.
Part of #1204. Changes the
set_value
CPO to dispatch toset_value
member functions instead of usingtag_invoke
. No compatibility is provided for receivers still wishing to usetag_invoke
.The
set_value
member is mandated to be noexcept, so westatic_assert
inside the CPO to check that this is the case.Consistently changes all
set_value
members to move the receiver by value into theset_value
function scope, to emulate taking the receiver by value. Withtag_invoke
this was easily done by taking the receiver by value as a function parameter, but with a member function this isn't possible (without deducing this https://wg21.link/p0847), so we do the next best thing. I have not changed receivers in tests to consistently move the receiver into the function scope.The change to a member function also triggers some compilation failures with nvcc not liking the
PIKA_MOVE
/PIKA_FORWARD
macros. Given that #1325 is coming up soon anyway, I'm changing the offending places unconditionally to usestd::move
/std::forward
.