hpx/functional/function.hpp#

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

Defines

HPX_UTIL_REGISTER_FUNCTION_DECLARATION(Sig, F, Name)#
HPX_UTIL_REGISTER_FUNCTION(Sig, F, Name)#
namespace hpx

Top level namespace.

template<typename Sig, bool Serializable = false>
class function#
#include <function.hpp>

Class template hpx::function is a general-purpose polymorphic function wrapper. Instances of hpx::function can store, copy, and invoke any CopyConstructible Callable target &#8212; functions, lambda expressions, bind expressions, or other function objects, as well as pointers to member functions and pointers to data members. The stored callable object is called the target of hpx::function. If an hpx::function contains no target, it is called empty. Invoking the target of an empty hpx::function results in hpx::bad_function_call exception being thrown. hpx::function satisfies the requirements of CopyConstructible and CopyAssignable.

template<typename R, typename ...Ts, bool Serializable>
class function<R(Ts...), Serializable> : public util::detail::basic_function<R(Ts...), true, Serializable>#

Public Types

using result_type = R#

Public Functions

inline constexpr function(std::nullptr_t = nullptr) noexcept#
function(function const&) = default#
function(function&&) noexcept = default#
function &operator=(function const&) = default#
function &operator=(function&&) noexcept = default#
template<typename F, typename FD = std::decay_t<F>, typename Enable1 = std::enable_if_t<!std::is_same_v<FD, function>>, typename Enable2 = std::enable_if_t<is_invocable_r_v<R, FD&, Ts...>>>
inline function(F &&f)#
template<typename F, typename FD = std::decay_t<F>, typename Enable1 = std::enable_if_t<!std::is_same_v<FD, function>>, typename Enable2 = std::enable_if_t<is_invocable_r_v<R, FD&, Ts...>>>
inline function &operator=(F &&f)#

Private Types

using base_type = util::detail::basic_function<R(Ts...), true, Serializable>#
namespace distributed#

Typedefs

template<typename Sig>
using function = hpx::function<Sig, true>#
namespace util

Typedefs

typedef hpx::function<Sig, Serializable> instead#