hpx::mem_fn
hpx::mem_fn#
Defined in header hpx/functional.hpp.
See Public API for a list of names and headers that are part of the public HPX API.
-
namespace hpx
Top level namespace.
Functions
-
template<typename M, typename C>
constexpr detail::mem_fn<M C::*> mem_fn(M C::* pm) noexcept# Function template
hpx::mem_fn
generates wrapper objects for pointers to members, which can store, copy, and invoke a pointer to member. Both references and pointers (including smart pointers) to an object can be used when invoking ahpx::mem_fn
.- Parameters
pm – pointer to member that will be wrapped
- Returns
a call wrapper of unspecified type with the following member:
Lettemplate <typename... Ts> constexpr typename util::invoke_result<MemberPointer, Ts...>::type operator()(Ts&&... vs) noexcept;
fn
be the call wrapper returned by a call tohpx::mem_fn
with a pointer to memberpm
. Then the expressionfn(t,a2,...,aN)
is equivalent toHPX_INVOKE(pm,t,a2,...,aN)
. Thus, the return type of operator() isstd::result_of<decltype(pm)(Ts&&...)>::type
or equivalentlystd::invoke_result_t<decltype(pm),Ts&&...>
, and the value innoexcept
specifier is equal tostd::is_nothrow_invocable_v<decltype(pm),Ts&&...>
) . Each argument invs
is perfectly forwarded, as if bystd::forward<Ts>(vs)
… .
-
template<typename R, typename C, typename ...Ps>
constexpr detail::mem_fn<R (C::*)(Ps...)> mem_fn(R (C::* pm)(Ps...)) noexcept# Function template
hpx::mem_fn
generates wrapper objects for pointers to members, which can store, copy, and invoke a pointer to member. Both references and pointers (including smart pointers) to an object can be used when invoking ahpx::mem_fn
.- Parameters
pm – pointer to member that will be wrapped
- Returns
a call wrapper of unspecified type with the following member:
Lettemplate <typename... Ts> constexpr typename util::invoke_result<MemberPointer, Ts...>::type operator()(Ts&&... vs) noexcept;
fn
be the call wrapper returned by a call tohpx::mem_fn
with a pointer to memberpm
. Then the expressionfn(t,a2,...,aN)
is equivalent toHPX_INVOKE(pm,t,a2,...,aN)
. Thus, the return type of operator() isstd::result_of<decltype(pm)(Ts&&...)>::type
or equivalentlystd::invoke_result_t<decltype(pm),Ts&&...>
, and the value innoexcept
specifier is equal tostd::is_nothrow_invocable_v<decltype(pm),Ts&&...>
) . Each argument invs
is perfectly forwarded, as if bystd::forward<Ts>(vs)
… .
-
template<typename R, typename C, typename ...Ps>
constexpr detail::mem_fn<R (C::*)(Ps...) const> mem_fn(R (C::* pm)(Ps...) const) noexcept# Function template
hpx::mem_fn
generates wrapper objects for pointers to members, which can store, copy, and invoke a pointer to member. Both references and pointers (including smart pointers) to an object can be used when invoking ahpx::mem_fn
.- Parameters
pm – pointer to member that will be wrapped
- Returns
a call wrapper of unspecified type with the following member:
Lettemplate <typename... Ts> constexpr typename util::invoke_result<MemberPointer, Ts...>::type operator()(Ts&&... vs) noexcept;
fn
be the call wrapper returned by a call tohpx::mem_fn
with a pointer to memberpm
. Then the expressionfn(t,a2,...,aN)
is equivalent toHPX_INVOKE(pm,t,a2,...,aN)
. Thus, the return type of operator() isstd::result_of<decltype(pm)(Ts&&...)>::type
or equivalentlystd::invoke_result_t<decltype(pm),Ts&&...>
, and the value innoexcept
specifier is equal tostd::is_nothrow_invocable_v<decltype(pm),Ts&&...>
) . Each argument invs
is perfectly forwarded, as if bystd::forward<Ts>(vs)
… .
-
template<typename M, typename C>