diff --git a/hpx/runtime/actions/basic_action.hpp b/hpx/runtime/actions/basic_action.hpp index 6ca86eda65f4..6cf4bd41d78c 100644 --- a/hpx/runtime/actions/basic_action.hpp +++ b/hpx/runtime/actions/basic_action.hpp @@ -195,6 +195,7 @@ namespace hpx { namespace actions std::is_void::value, util::unused_type, R >::type result_type; + template HPX_FORCEINLINE result_type operator()( naming::address::address_type lva, @@ -205,6 +206,7 @@ namespace hpx { namespace actions std::forward(vs)...); } + private: template HPX_FORCEINLINE result_type invoke(std::true_type, naming::address::address_type lva, @@ -291,7 +293,8 @@ namespace hpx { namespace actions naming::address::address_type lva, naming::address::component_type comptype, Ts&&... vs) { - if (target && target.get_management_type() == naming::id_type::unmanaged) + if (target && + target.get_management_type() == naming::id_type::unmanaged) { return traits::action_decorate_function::call(lva, util::bind(util::one_shot( @@ -320,7 +323,8 @@ namespace hpx { namespace actions naming::address::component_type&, Ts&&... > thread_function; - if (target && target.get_management_type() == naming::id_type::unmanaged) + if (target && + target.get_management_type() == naming::id_type::unmanaged) { return traits::action_decorate_function::call(lva, thread_function(std::move(cont), lva, invoker(), @@ -384,7 +388,7 @@ namespace hpx { namespace actions Ts&&... vs) const { return sync_invoke::call( - launch::sync, id, throws, std::forward(vs)...); + policy, id, throws, std::forward(vs)...); } template @@ -418,8 +422,8 @@ namespace hpx { namespace actions operator()(DistPolicy const& dist_policy, error_code& ec, Ts&&... vs) const { - return (*this)(launch::sync, dist_policy, ec, - std::forward(vs)...); + return sync_invoke::call( + launch::sync, dist_policy, ec, std::forward(vs)...); } template @@ -431,8 +435,8 @@ namespace hpx { namespace actions operator()(launch policy, DistPolicy const& dist_policy, Ts&&... vs) const { - return (*this)(launch::sync, dist_policy, throws, - std::forward(vs)...); + return sync_invoke::call( + policy, dist_policy, throws, std::forward(vs)...); } template @@ -443,8 +447,8 @@ namespace hpx { namespace actions >::type operator()(DistPolicy const& dist_policy, Ts&&... vs) const { - return (*this)(launch::sync, dist_policy, throws, - std::forward(vs)...); + return sync_invoke::call( + launch::sync, dist_policy, throws, std::forward(vs)...); } ///////////////////////////////////////////////////////////////////////