functional

#include <compatibility/hpx/util/mem_fn.hpp>

#include <compatibility/hpx/util/protect.hpp>

#include <compatibility/hpx/util/invoke.hpp>

#include <compatibility/hpx/util/deferred_call.hpp>

#include <compatibility/hpx/util/bind_front.hpp>

#include <compatibility/hpx/util/invoke_fused.hpp>

#include <compatibility/hpx/util/first_argument.hpp>

#include <compatibility/hpx/util/function_ref.hpp>

#include <compatibility/hpx/util/bind.hpp>

#include <compatibility/hpx/util/function.hpp>

#include <compatibility/hpx/util/bind_back.hpp>

#include <compatibility/hpx/util/result_of.hpp>

#include <compatibility/hpx/util/one_shot.hpp>

#include <compatibility/hpx/util/unique_function.hpp>

#include <hpx/functional/mem_fn.hpp>

namespace hpx
namespace util

Functions

template <typename M, typename C>
detail::mem_fn<M C::*> mem_fn(M C::*pm)
template <typename R, typename C, typename… Ps>
detail::mem_fn<R (C::*)(Ps...)> hpx::util::mem_fn(R(C::*)(Ps...) pm)
template <typename R, typename C, typename… Ps>
detail::mem_fn<R (C::*)(Ps...) const> hpx::util::mem_fn(R(C::*)(Ps...) const pm)

#include <hpx/functional/protect.hpp>

namespace hpx
namespace util

Functions

template <typename T>
HPX_HOST_DEVICE std::enable_if< traits::is_bind_expression<typename std::decay<T>::type>::value, detail::protected_bind<typename std::decay<T>::type> >::type hpx::util::protect(T && f)
template <typename T>
HPX_HOST_DEVICE std::enable_if< !traits::is_bind_expression<typename std::decay<T>::type>::value, T>::type hpx::util::protect(T && v)

#include <hpx/functional/invoke.hpp>

Defines

HPX_INVOKE(F, ...)
HPX_INVOKE_R(R, F, ...)
namespace hpx
namespace util

Functions

template <typename F, typename… Ts>
HPX_HOST_DEVICE util::invoke_result<F, Ts...>::type hpx::util::invoke(F && f, Ts &&... vs)

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

Return
The result of the callable object when it’s called with the given argument types.
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
Exceptions
  • std::exception: like objects thrown by call to object f with the argument types vs.

template <typename R, typename F, typename… Ts>
HPX_HOST_DEVICE R hpx::util::invoke_r(F && f, Ts &&... vs)

Template Parameters
  • R: The result type of the function when it’s called with the content of the given argument types vs.

namespace functional
struct invoke

Public Functions

template <typename F, typename… Ts>
HPX_HOST_DEVICE util::invoke_result<F, Ts...>::type hpx::util::functional::invoke::operator()(F && f, Ts &&... vs) const
template <typename R>
struct invoke_r

Public Functions

template <typename F, typename… Ts>
HPX_HOST_DEVICE R hpx::util::functional::invoke_r::operator()(F && f, Ts &&... vs) const

#include <hpx/functional/deferred_call.hpp>

namespace hpx
namespace serialization

Functions

template <typename Archive, typename F, typename... Ts>
void serialize(Archive &ar, hpx::util::detail::deferred<F, Ts...> &d, unsigned int const version = 0)
namespace util

Functions

template <typename F, typename... Ts>
detail::deferred<typename std::decay<F>::type, typename std::decay<Ts>::type...> deferred_call(F &&f, Ts&&... vs)
template <typename F>
std::decay<F>::type deferred_call(F &&f)

#include <hpx/functional/bind_front.hpp>

namespace hpx
namespace serialization

Functions

template <typename Archive, typename F, typename... Ts>
void serialize(Archive &ar, hpx::util::detail::bound_front<F, Ts...> &bound, unsigned int const version = 0)
namespace util

Functions

template <typename F, typename... Ts>
detail::bound_front<typename std::decay<F>::type, typename std::decay<Ts>::type...> bind_front(F &&f, Ts&&... vs)
template <typename F>
std::decay<F>::type bind_front(F &&f)

#include <hpx/functional/invoke_fused.hpp>

namespace hpx
namespace util

Functions

template <typename F, typename Tuple>
HPX_HOST_DEVICE detail::invoke_fused_result<F, Tuple>::type hpx::util::invoke_fused(F && f, Tuple && t)

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

Return
The result of the callable object when it’s called with the content of the given sequenced type.
Note
This function is similar to std::apply (C++17)
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 which is content accessible through a call to hpx::util::get.
Exceptions
  • std::exception: like objects thrown by call to object f with the arguments contained in the sequenceable type t.

template <typename R, typename F, typename Tuple>
HPX_HOST_DEVICE R hpx::util::invoke_fused_r(F && f, Tuple && t)

Template Parameters
  • R: The result type of the function when it’s called with the content of the given sequenced type.

#include <hpx/functional/first_argument.hpp>

#include <hpx/functional/function_ref.hpp>

namespace hpx
namespace util
template <typename R, typename... Ts>
template<>
class function_ref<R(Ts...)>

Public Functions

template <typename F, typename FD = typename std::decay<F>::type, typename Enable = typename std::enable_if< !std::is_same<FD, function_ref>::value && traits::is_invocable_r<R, F&, Ts...>::value>::type>
function_ref(F &&f)
function_ref(function_ref const &other)
template <typename F, typename FD = typename std::decay<F>::type, typename Enable = typename std::enable_if< !std::is_same<FD, function_ref>::value && traits::is_invocable_r<R, F&, Ts...>::value>::type>
function_ref &operator=(F &&f)
function_ref &operator=(function_ref const &other)
template <typename F, typename T = typename std::remove_reference<F>::type, typename Enable = typename std::enable_if<!std::is_pointer<T>::value>::type>
void assign(F &&f)
template <typename T>
void assign(std::reference_wrapper<T> f_ref)
template <typename T>
void assign(T *f_ptr)
void swap(function_ref &f)
R operator()(Ts... vs) const
std::size_t get_function_address() const
char const *get_function_annotation() const
util::itt::string_handle get_function_annotation_itt() const

Protected Attributes

template<>
R (*vptr)(void *, Ts&&...)
void *object

Private Types

template<>
using VTable = detail::function_ref_vtable<R(Ts...)>

Private Static Functions

template <typename T>
static VTable const *get_vtable()

#include <hpx/functional/bind.hpp>

namespace hpx
namespace serialization

Functions

template <typename Archive, typename F, typename... Ts>
void serialize(Archive &ar, hpx::util::detail::bound<F, Ts...> &bound, unsigned int const version = 0)
template <typename Archive, std::size_t I>
void serialize(Archive &ar, hpx::util::detail::placeholder<I>&, unsigned int const = 0)
namespace util

Functions

template <typename F, typename... Ts>
std::enable_if<!traits::is_action<typename std::decay<F>::type>::value, detail::bound<typename std::decay<F>::type, typename std::decay<Ts>::type...>>::type bind(F &&f, Ts&&... vs)
namespace placeholders

Variables

HPX_STATIC_CONSTEXPR detail::placeholder<1> hpx::util::placeholders::_1 = {}
HPX_STATIC_CONSTEXPR detail::placeholder<2> hpx::util::placeholders::_2 = {}
HPX_STATIC_CONSTEXPR detail::placeholder<3> hpx::util::placeholders::_3 = {}
HPX_STATIC_CONSTEXPR detail::placeholder<4> hpx::util::placeholders::_4 = {}
HPX_STATIC_CONSTEXPR detail::placeholder<5> hpx::util::placeholders::_5 = {}
HPX_STATIC_CONSTEXPR detail::placeholder<6> hpx::util::placeholders::_6 = {}
HPX_STATIC_CONSTEXPR detail::placeholder<7> hpx::util::placeholders::_7 = {}
HPX_STATIC_CONSTEXPR detail::placeholder<8> hpx::util::placeholders::_8 = {}
HPX_STATIC_CONSTEXPR detail::placeholder<9> hpx::util::placeholders::_9 = {}

#include <hpx/functional/function.hpp>

Defines

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

Typedefs

using hpx::util::function_nonser = typedef function<Sig, false>
template <typename R, typename... Ts, bool Serializable>
template<>
class function<R(Ts...), Serializable> : public detail::basic_function<R(Ts...), true, Serializable>

Public Types

typedef R result_type

Public Functions

function(std::nullptr_t = nullptr)
function(function const&)
function(function&&)
function &operator=(function const&)
function &operator=(function&&)
template <typename F, typename FD = typename std::decay<F>::type, typename Enable1 = typename std::enable_if< !std::is_same<FD, function>::value>::type, typename Enable2 = typename std::enable_if< traits::is_invocable_r<R, FD&, Ts...>::value>::type>
function(F &&f)
template <typename F, typename FD = typename std::decay<F>::type, typename Enable1 = typename std::enable_if< !std::is_same<FD, function>::value>::type, typename Enable2 = typename std::enable_if< traits::is_invocable_r<R, FD&, Ts...>::value>::type>
function &operator=(F &&f)

Private Types

template<>
using base_type = detail::basic_function<R(Ts...), true, Serializable>

#include <hpx/functional/bind_back.hpp>

namespace hpx
namespace serialization

Functions

template <typename Archive, typename F, typename... Ts>
void serialize(Archive &ar, hpx::util::detail::bound_back<F, Ts...> &bound, unsigned int const version = 0)
namespace util

Functions

template <typename F, typename... Ts>
detail::bound_back<typename std::decay<F>::type, typename std::decay<Ts>::type...> bind_back(F &&f, Ts&&... vs)
template <typename F>
std::decay<F>::type bind_back(F &&f)

#include <hpx/functional/result_of.hpp>

#include <hpx/functional/one_shot.hpp>

namespace hpx
namespace serialization

Functions

template <typename Archive, typename F>
void serialize(Archive &ar, hpx::util::detail::one_shot_wrapper<F> &one_shot_wrapper, unsigned int const version = 0)
namespace util

Functions

template <typename F>
detail::one_shot_wrapper<typename std::decay<F>::type> one_shot(F &&f)

#include <hpx/functional/unique_function.hpp>

Defines

HPX_UTIL_REGISTER_UNIQUE_FUNCTION_DECLARATION(Sig, F, Name)
HPX_UTIL_REGISTER_UNIQUE_FUNCTION(Sig, F, Name)
namespace hpx
namespace util

Typedefs

using hpx::util::unique_function_nonser = typedef unique_function<Sig, false>
template <typename R, typename... Ts, bool Serializable>
template<>
class unique_function<R(Ts...), Serializable> : public detail::basic_function<R(Ts...), false, Serializable>

Public Types

typedef R result_type

Public Functions

unique_function(std::nullptr_t = nullptr)
unique_function(unique_function&&)
unique_function &operator=(unique_function&&)
template <typename F, typename FD = typename std::decay<F>::type, typename Enable1 = typename std::enable_if< !std::is_same<FD, unique_function>::value>::type, typename Enable2 = typename std::enable_if< traits::is_invocable_r<R, FD&, Ts...>::value>::type>
unique_function(F &&f)
template <typename F, typename FD = typename std::decay<F>::type, typename Enable1 = typename std::enable_if< !std::is_same<FD, unique_function>::value>::type, typename Enable2 = typename std::enable_if< traits::is_invocable_r<R, FD&, Ts...>::value>::type>
unique_function &operator=(F &&f)

Private Types

template<>
using base_type = detail::basic_function<R(Ts...), false, Serializable>

#include <hpx/functional/traits/is_bind_expression.hpp>

namespace hpx
namespace traits
template <typename T>
struct is_bind_expression : public false_type

Subclassed by hpx::traits::is_bind_expression< T const >

#include <hpx/functional/traits/get_function_annotation.hpp>

namespace hpx
namespace traits
template <typename F, typename Enable = void>
struct get_function_annotation

Public Static Functions

static char const *call(F const&)

#include <hpx/functional/traits/get_function_address.hpp>

template <typename R, typename Obj, typename... Ts>
template<>
struct get_function_address<R (Obj::*)(Ts...)>

Public Static Functions

static std::size_t hpx::traits::get_function_address::call(R(Obj::*)(Ts...) f)
template <typename R, typename Obj, typename... Ts>
template<>
struct get_function_address<R (Obj::*)(Ts...) const>

Public Static Functions

static std::size_t hpx::traits::get_function_address::call(R(Obj::*)(Ts...) const f)
namespace hpx
namespace traits
template <typename F, typename Enable = void>
struct get_function_address

Public Static Functions

static std::size_t call(F const &f)
template <typename R, typename... Ts>
template<>
struct get_function_address<R (*)(Ts...)>

Public Static Functions

static std::size_t call(R (*f)(Ts...))
template <typename R, typename Obj, typename... Ts>
template<>
struct get_function_address<R (Obj::*)(Ts...) const>

Public Static Functions

static std::size_t hpx::traits::get_function_address::call(R(Obj::*)(Ts...) const f)
template <typename R, typename Obj, typename... Ts>
template<>
struct get_function_address<R (Obj::*)(Ts...)>

Public Static Functions

static std::size_t hpx::traits::get_function_address::call(R(Obj::*)(Ts...) f)

#include <hpx/functional/traits/is_action.hpp>

#include <hpx/functional/traits/is_callable.hpp>

#include <hpx/functional/traits/is_placeholder.hpp>

namespace hpx
namespace traits
template <typename T>
struct is_placeholder : public boost::is_placeholder<T>

Subclassed by hpx::traits::is_placeholder< T const >