-
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
Remove PIKA_MOVE
and PIKA_FORWARD
#1325
Conversation
This PR has lower priority than others, so in case of conflicts let's try to merge others first and push this when it's a bit more quiet on the PR-front. |
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 |
432cded
to
41f7191
Compare
5cdca10
to
a0a4454
Compare
d868174
to
bbfff67
Compare
bbfff67
to
be9b984
Compare
Most supported compiler versions treat std::move as a builtin, removing the need for the manual use of a cast to improve compile times.
be9b984
to
e528ef4
Compare
The macros were originally introduced to avoid the template instantiation overhead of
std::move
andstd::forward
, as well as the debug bloat. Both clang and GCC should nowadays treat them as builtins, though perhaps not on all supported compiler versions. Since the original change was simply a build-time optimization I think it's fair to go back to thestd::
functions again.The benefit is that tooling like clang-tidy can warn about improper uses of the functions.
The one downside of using
std::move
overPIKA_MOVE
(which is simply a cast to a non-const r-value reference) is thatstd::move
will happily createconst&&
types, where that is almost never intended for a move.