actions_base: reimplement HPX_DEFINE_PLAIN_ACTION_2 using C++26 reflection#7280
Draft
Priyanshi507 wants to merge 1 commit into
Draft
actions_base: reimplement HPX_DEFINE_PLAIN_ACTION_2 using C++26 reflection#7280Priyanshi507 wants to merge 1 commit into
Priyanshi507 wants to merge 1 commit into
Conversation
When HPX_HAVE_CXX26_REFLECTION is defined, HPX_DEFINE_PLAIN_ACTION_2 now expands to: using name = hpx::actions::reflect_action<^^func> instead of the verbose make_action_t struct definition. This keeps the exact same user-facing macro syntax (HPX_PLAIN_ACTION/ HPX_DEFINE_PLAIN_ACTION) while using C++26 reflection internally, eliminating the need for HPX_REGISTER_ACTION. The non-reflection paths (NVCC/CUDACC and standard) are preserved unchanged for backwards compatibility. Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Up to standards ✅🟢 Issues
|
Collaborator
|
Can one of the admins verify this patch? |
Contributor
Author
|
@hkaiser |
1 task
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When
HPX_HAVE_CXX26_REFLECTIONis defined,HPX_DEFINE_PLAIN_ACTION_2now uses
reflect_action<^^func>internally:Before:
After (with reflection):
using name = hpx::actions::reflect_action<^^func>;Key insight
The first macro argument
funcis a named entity at the call site —not a template parameter — so
^^funcworks correctly on bothGCC trunk and Clang P2996.
User impact
Zero — same macro syntax, reflection used internally:
Backwards compatibility
Non-reflection paths (NVCC/CUDACC and standard C++) are preserved unchanged.
Checklist