Skip to content

Fix missing invoke header in for_each_index algorithm#7223

Merged
hkaiser merged 2 commits intoTheHPXProject:masterfrom
arpittkhandelwal:fix/for-each-index-invoke
Apr 27, 2026
Merged

Fix missing invoke header in for_each_index algorithm#7223
hkaiser merged 2 commits intoTheHPXProject:masterfrom
arpittkhandelwal:fix/for-each-index-invoke

Conversation

@arpittkhandelwal
Copy link
Copy Markdown
Contributor

This PR fixes a build regression that was recently introduced in #7215 (Implement hpx::experimental::for_each_index (P4150R0)).
Some environments were seeing compilation failures (e.g., expression cannot be used as a function inside HPX_INVOKE) because the invoke template alias wasn't fully visible to the compiler during macro expansion.
This is resolved by explicitly adding the missing #include <hpx/functional/invoke.hpp> header to libs/core/algorithms/include/hpx/parallel/algorithms/for_each_index.hpp.
Related Issues:

Copilot AI review requested due to automatic review settings April 26, 2026 14:19
@codacy-production
Copy link
Copy Markdown

codacy-production Bot commented Apr 26, 2026

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a compilation regression in hpx::experimental::for_each_index by ensuring the HPX_INVOKE machinery is fully available when for_each_index.hpp is compiled, via adding the missing hpx/functional/invoke.hpp include.

Changes:

  • Add #include <hpx/functional/invoke.hpp> to for_each_index.hpp to make the invoke alias visible during HPX_INVOKE macro expansion.

@hkaiser
Copy link
Copy Markdown
Contributor

hkaiser commented Apr 26, 2026

@arpittkhandelwal I have pushed a possible fix to this PR. We've seen problems with HPX_INVOKE and gcc before.

Signed-off-by: Hartmut Kaiser <hartmut.kaiser@gmail.com>
Copilot AI review requested due to automatic review settings April 26, 2026 17:30
@hkaiser hkaiser force-pushed the fix/for-each-index-invoke branch from 8e2362e to 3c2496f Compare April 26, 2026 17:30
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review is ineligible. To be eligible to request a review, you need a paid Copilot license, or your organization must enable Copilot code review.

@arpittkhandelwal
Copy link
Copy Markdown
Contributor Author

@arpittkhandelwal I have pushed a possible fix to this PR. We've seen problems with HPX_INVOKE and gcc before.

Thanks sir for the update and fixes

@hkaiser hkaiser added this to the 2.0.0 milestone Apr 27, 2026
Copy link
Copy Markdown
Contributor

@hkaiser hkaiser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The remaining issues are unrelated. LGTM, thanks!

@hkaiser hkaiser merged commit 9c8f564 into TheHPXProject:master Apr 27, 2026
83 of 95 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants