Skip to content

actions_base: add auto-registration to reflect_action - #7298

Merged
hkaiser merged 9 commits into
TheHPXProject:masterfrom
Priyanshi507:reflect-action-auto-register
May 28, 2026
Merged

actions_base: add auto-registration to reflect_action#7298
hkaiser merged 9 commits into
TheHPXProject:masterfrom
Priyanshi507:reflect-action-auto-register

Conversation

@Priyanshi507

Copy link
Copy Markdown
Contributor

Summary

reflect_action now automatically registers its invocation counter
via a static register_action_invocation_count member — eliminating
the need for HPX_REGISTER_ACTION for reflection-based plain actions.

Design

Follows HPX's existing auto-registration pattern already used by
register_action<Action> in register_action.hpp:

template <std::meta::info F>
struct reflect_action : basic_action<...> {
    // Auto-registers during static initialization
    static detail::register_action_invocation_count<reflect_action<F>>
        invocation_count_registrar_;
};

What's still needed

The explicit transfer_action<reflect_action<F>> instantiation
(for shared library export) still requires HPX_REGISTER_ACTION
in non-reflection builds. For reflection builds, users can omit
HPX_REGISTER_ACTION entirely.

Depends on

Checklist

  • I have added a new feature and have added tests to go along with it.

reflect_action now includes a static register_action_invocation_count
member that automatically registers the action's invocation counter
during static initialization — no HPX_REGISTER_ACTION call needed.

This follows HPX's existing auto-registration pattern (already used
by register_action<Action> in register_action.hpp) and eliminates
boilerplate for reflection-based plain actions.

The explicit transfer_action instantiation (for shared library export)
still requires HPX_REGISTER_ACTION for non-reflection builds, but
reflect_action users can omit it entirely.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
@Priyanshi507
Priyanshi507 requested a review from hkaiser as a code owner May 27, 2026 12:57
Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
@StellarBot

Copy link
Copy Markdown
Collaborator

Can one of the admins verify this patch?

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
@codacy-production

codacy-production Bot commented May 27, 2026

Copy link
Copy Markdown

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.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Comment thread libs/full/actions_base/include/hpx/actions_base/reflect_action.hpp Outdated
Add Derived template parameter following the same pattern as
plain_action for future extensibility:

  template <std::meta::info F, typename Derived = void>
  struct reflect_action
    : basic_action<detail::plain_function,
          func_type,
          detail::action_type_t<reflect_action<F, Derived>, Derived>>

This allows user-defined types to derive from reflect_action<F>
to customize behavior, matching the extensibility of make_action_t.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
…strar_

Both the in-class declaration and out-of-class definition of
invocation_count_registrar_ now consistently use reflect_action<F, Derived>.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
…trar_

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
hkaiser
hkaiser previously approved these changes May 27, 2026

@hkaiser hkaiser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Otherwise, LGTM, thanks!

Comment thread libs/full/actions_base/include/hpx/actions_base/reflect_action.hpp Outdated
Comment thread libs/full/actions_base/include/hpx/actions_base/reflect_action.hpp Outdated
@hkaiser hkaiser added this to the 2.0.0 milestone May 27, 2026
Inside reflect_action's class body, 'reflect_action' refers to
'reflect_action<F, Derived>' via the injected class name, so
we can simplify:
- action_type_t<reflect_action<F, Derived>, Derived> -> action_type_t<reflect_action, Derived>
- register_action_invocation_count<reflect_action<F, Derived>> -> register_action_invocation_count<reflect_action>

Suggested by hkaiser.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>

@hkaiser hkaiser left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM, thanks!

@hkaiser
hkaiser merged commit 275a67d into TheHPXProject:master May 28, 2026
73 checks passed
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 2, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 2, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 3, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 3, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 3, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 3, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 4, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 4, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 4, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 4, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 8, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 8, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 9, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 9, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jun 15, 2026
…t_action)

Summary
Extends reflect_action with reflect_component_action<F> — a C++26
reflection-based replacement for HPX_DEFINE_COMPONENT_ACTION.

Before (3 manual steps):
  HPX_DEFINE_COMPONENT_ACTION(server, compute, compute_action)
  HPX_REGISTER_ACTION_DECLARATION(compute_action)
  HPX_REGISTER_ACTION(compute_action)

After (single line):
  HPX_COMPONENT_ACTION(server, compute, compute_action);

Design
- reflect_component_action_base<F> extracts component_type via
  parent_of(F) and func_type via type_of(F) — two-step workaround
  following the same pattern as reflect_action_base<F>
- reflect_component_action<F, Derived> inherits from
  basic_action<component_type, func_type, action_type_t<...>>
- Auto-registration via static invocation_count_registrar_ member
  following the same pattern as reflect_action<F>
- HPX_COMPONENT_ACTION(component, func, name) macro as cross-compiler
  fallback (GCC trunk + Clang P2996)

Depends on
- PR TheHPXProject#7298 (merged) — reflect_action with Derived parameter

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 4, 2026
Adds a new section to migration_guide.rst documenting the transition
from HPX's traditional macro-based action API to the new C++26
reflection-based API introduced in PRs TheHPXProject#7298, TheHPXProject#7311, and TheHPXProject#7342.

Covers:
- Build requirements (GCC trunk, Clang P2996, CMake flag)
- Transparent migration: existing HPX_PLAIN_ACTION/HPX_DEFINE_COMPONENT_ACTION
  code requires zero source changes when HPX_WITH_CXX26_REFLECTION=ON
- Explicit migration examples for plain, component, and direct actions
- Overloaded function handling (keep existing macros)
- Compile-time properties exposed by reflection-based action types
  (arity, func_ptr_type, func_ptr)

Part of GSoC 2026: Use C++26 Reflection for HPX Remote Operations.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 5, 2026
Adds a new section to migration_guide.rst documenting the transition
from HPX's traditional macro-based action API to the new C++26
reflection-based API introduced in PRs TheHPXProject#7298, TheHPXProject#7311, and TheHPXProject#7342.

Covers:
- Build requirements (GCC trunk, Clang P2996, CMake flag)
- Transparent migration: existing HPX_PLAIN_ACTION/HPX_DEFINE_COMPONENT_ACTION
  code requires zero source changes when HPX_WITH_CXX26_REFLECTION=ON
- Explicit migration examples for plain, component, and direct actions
- Overloaded function handling (keep existing macros)
- Compile-time properties exposed by reflection-based action types
  (arity, func_ptr_type, func_ptr)

Part of GSoC 2026: Use C++26 Reflection for HPX Remote Operations.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 5, 2026
Adds a new section to migration_guide.rst documenting the transition
from HPX's traditional macro-based action API to the new C++26
reflection-based API introduced in PRs TheHPXProject#7298, TheHPXProject#7311, and TheHPXProject#7342.

Covers:
- Build requirements (GCC trunk, Clang P2996, CMake flag)
- Transparent migration: existing HPX_PLAIN_ACTION/HPX_DEFINE_COMPONENT_ACTION
  code requires zero source changes when HPX_WITH_CXX26_REFLECTION=ON
- Explicit migration examples for plain, component, and direct actions
- Overloaded function handling (keep existing macros)
- Compile-time properties exposed by reflection-based action types
  (arity, func_ptr_type, func_ptr)

Part of GSoC 2026: Use C++26 Reflection for HPX Remote Operations.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 6, 2026
Adds a new section to migration_guide.rst documenting the transition
from HPX's traditional macro-based action API to the new C++26
reflection-based API introduced in PRs TheHPXProject#7298, TheHPXProject#7311, and TheHPXProject#7342.

Covers:
- Build requirements (GCC trunk, Clang P2996, CMake flag)
- Transparent migration: existing HPX_PLAIN_ACTION/HPX_DEFINE_COMPONENT_ACTION
  code requires zero source changes when HPX_WITH_CXX26_REFLECTION=ON
- Explicit migration examples for plain, component, and direct actions
- Overloaded function handling (keep existing macros)
- Compile-time properties exposed by reflection-based action types
  (arity, func_ptr_type, func_ptr)

Part of GSoC 2026: Use C++26 Reflection for HPX Remote Operations.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 13, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 14, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 14, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 14, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 14, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 14, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 14, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 15, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 15, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 15, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 15, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 16, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 16, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
Priyanshi507 added a commit to Priyanshi507/hpx that referenced this pull request Jul 16, 2026
Adds a new hpx::async overload that accepts a std::meta::info
reflection of a free function as a non-type template parameter,
eliminating the need to define an explicit action type:

    // Before: explicit action type required
    using my_action = hpx::actions::reflect_action<^^app::compute>;
    hpx::async<my_action>(target, args...);

    // After: direct reflection syntax
    hpx::async<^^app::compute>(target, args...);

The overload is constrained to accept only viable distributed
targets (hpx::id_type, client types, distribution policies),
matching the existing async_action_dispatch specializations.
Internally it constructs reflect_action<F>{} and delegates to
the existing hpx::async(action, target, ...) machinery — no
changes to dispatch internals required.

Guarded by HPX_HAVE_CXX26_REFLECTION.

Suggested by hkaiser as a natural extension of the reflection-based
action work from PRs TheHPXProject#7298, TheHPXProject#7311, TheHPXProject#7342, TheHPXProject#7349.

Signed-off-by: Priyanshi507 <hiiuiuiabi@gmail.com>
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