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

Merged
merged 4 commits into from
Nov 22, 2024

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.02% (target: -1.00%) 85.56% (target: 90.00%)
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (2a8205c) 18219 13746 75.45%
Head commit (e528ef4) 18217 (-2) 13740 (-6) 75.42% (-0.02%)

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) 637 545 85.56%

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

@msimberg msimberg self-assigned this Nov 11, 2024
@msimberg msimberg force-pushed the remove-pika-move-forward branch 4 times, most recently from 432cded to 41f7191 Compare November 19, 2024 16:37
@msimberg msimberg marked this pull request as ready for review November 20, 2024 10:51
@msimberg msimberg force-pushed the remove-pika-move-forward branch 4 times, most recently from 5cdca10 to a0a4454 Compare November 21, 2024 16:05
@msimberg msimberg added this pull request to the merge queue Nov 21, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to a conflict with the base branch Nov 21, 2024
@msimberg msimberg added this pull request to the merge queue Nov 22, 2024
Merged via the queue into pika-org:main with commit 015302c Nov 22, 2024
36 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

1 participant