Skip to content
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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

msimberg
Copy link
Contributor

The macros were originally introduced to avoid the template instantiation overhead of std::move and std::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 the std:: 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 over PIKA_MOVE (which is simply a cast to a non-const r-value reference) is that std::move will happily create const&& types, where that is almost never intended for a move.

@msimberg msimberg added this to the 0.31.0 milestone Nov 11, 2024
@msimberg
Copy link
Contributor Author

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.

Copy link

codacy-production bot commented Nov 11, 2024

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
+0.06% (target: -1.00%) 85.58% (target: 90.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (81d29bf) 18274 13788 75.45%
Head commit (41f7191) 18272 (-2) 13797 (+9) 75.51% (+0.06%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#1325) 631 540 85.58%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

Most supported compiler versions treat std::move as a builtin, removing the need for the manual use
of a cast to improve compile times.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

1 participant