hpx::invoke#

Defined in header hpx/functional.hpp.

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

Defines

HPX_INVOKE_R(R, F, ...)#
namespace hpx

Top level namespace.

Functions

template<typename F, typename ...Ts>
constexpr util::invoke_result_t<F, Ts&&...> invoke(F &&f, Ts&&... vs) noexcept(noexcept(HPX_INVOKE(HPX_FORWARD(F, f), HPX_FORWARD(Ts, vs)...)))#

Invokes the given callable object f with the content of the argument pack vs

Note

This function is similar to std::invoke (C++17)

Parameters
  • f – Requires to be a callable object. If f is a member function pointer, the first argument in the pack will be treated as the callee (this object).

  • vs – An arbitrary pack of arguments

Throws

std::exception – like objects thrown by call to object f with the argument types vs.

Returns

The result of the callable object when it’s called with the given argument types.

template<typename R, typename F, typename ...Ts>
constexpr R invoke_r(F &&f, Ts&&... vs) noexcept(noexcept(HPX_INVOKE(HPX_FORWARD(F, f), HPX_FORWARD(Ts, vs)...)))#

Invokes the given callable object f with the content of the argument pack vs

Note

This function is similar to std::invoke (C++17)

Parameters
  • f – Requires to be a callable object. If f is a member function pointer, the first argument in the pack will be treated as the callee (this object).

  • vs – An arbitrary pack of arguments

Throws

std::exception – like objects thrown by call to object f with the argument types vs.

Template Parameters

R – The result type of the function when it’s called with the content of the given argument types vs.

Returns

The result of the callable object when it’s called with the given argument types.

namespace functional#
struct invoke#

Public Functions

template<typename F, typename ...Ts>
inline constexpr util::invoke_result_t<F, Ts&&...> operator()(F &&f, Ts&&... vs) const noexcept(noexcept(HPX_INVOKE(HPX_FORWARD(F, f), HPX_FORWARD(Ts, vs)...)))#
template<typename R>
struct invoke_r#

Public Functions

template<typename F, typename ...Ts>
inline constexpr R operator()(F &&f, Ts&&... vs) const noexcept(noexcept(HPX_INVOKE(HPX_FORWARD(F, f), HPX_FORWARD(Ts, vs)...)))#