hpx::invoke_fused

Contents

hpx::invoke_fused#

Defined in header hpx/functional.hpp.

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

See also:

template<typename F, typename Tuple>
constexpr detail::invoke_fused_result_t<F, Tuple> hpx::invoke_fused(F &&f, Tuple &&t) noexcept(noexcept(detail::invoke_fused_impl(detail::fused_index_pack_t<Tuple>{}, std::forward<F>(f), std::forward<Tuple>(t))))#

Invokes the given callable object f with the content of the sequenced type t (tuples, pairs).

Note

This function is similar to std::apply (C++17). The difference between hpx::invoke and hpx::invoke_fused is that the later unpacks the tuples while the former cannot. Turning a tuple into a parameter pack is not a trivial operation which makes hpx::invoke_fused rather useful.

Parameters:
  • f – Must be a callable object. If f is a member function pointer, the first argument in the sequenced type will be treated as the callee (this object).

  • t – A type whose contents are accessible through a call to hpx::get.

Throws:

std::exception – like objects thrown by call to object f with the arguments contained in the sequenceable type t.

Returns:

The result of the callable object when it’s called with the content of the given sequenced type.