hpx/actions_base/reflect_annotated_actions.hpp#

Defined in header hpx/actions_base/reflect_annotated_actions.hpp.

See Public API for a list of names and headers that are part of the public HPX API.

Annotation-driven HPX action registration via C++26 reflection.

Functions decorated with [[=hpx::actions::detail::remote_function{}]] are automatically discovered and registered as HPX plain actions.

Usage:

namespace my_app {
    [[=hpx::actions::detail::remote_function{}]]
    int compute(int x) { return x + 1; }
}
HPX_REGISTER_ANNOTATED_ACTIONS(my_app)

\warning This macro must be invoked after all annotated function
definitions in \a Ns are complete. Since C++ namespaces are open,
functions added to \a Ns after this macro is expanded will NOT be
discovered or registered.

// Then dispatch via:
hpx::async<hpx::actions::reflect_action<^^my_app::compute>>(id, 42);