hpx::bind, hpx::placeholders::_1, hpx::placeholders::_2, …, hpx::placeholders::_9#

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 F, typename ...Ts, typename Enable = std::enable_if_t<!traits::is_action_v<std::decay_t<F>>>>
constexpr detail::bound<std::decay_t<F>, util::make_index_pack_t<sizeof...(Ts)>, util::decay_unwrap_t<Ts>...> bind(F &&f, Ts&&... vs)#

The function template bind generates a forwarding call wrapper for f. Calling this wrapper is equivalent to invoking f with some of its arguments bound to vs.

Parameters
  • f – Callable object (function object, pointer to function, reference to function, pointer to member function, or pointer to data member) that will be bound to some arguments

  • vs – list of arguments to bind, with the unbound arguments replaced by the placeholders _1, _2, _3… of namespace hpx::placeholders

Returns

A function object of unspecified type T, for which

hpx::is_bind_expression<T>::value == true. 

namespace placeholders#

The hpx::placeholders namespace contains the placeholder objects [_1, …, _N] where N is an implementation defined maximum number.

When used as an argument in a hpx::bind expression, the placeholder objects are stored in the generated function object, and when that function object is invoked with unbound arguments, each placeholder _N is replaced by the corresponding Nth unbound argument.

The types of the placeholder objects are DefaultConstructible and CopyConstructible, their default copy/move constructors do not throw exceptions, and for any placeholder _N, the type hpx::is_placeholder<decltype(_N)> is defined, where hpx::is_placeholder<decltype(_N)> is derived from std::integral_constant<int, N>.

Variables

constexpr detail::placeholder<1> _1 = {}#
constexpr detail::placeholder<2> _2 = {}#
constexpr detail::placeholder<3> _3 = {}#
constexpr detail::placeholder<4> _4 = {}#
constexpr detail::placeholder<5> _5 = {}#
constexpr detail::placeholder<6> _6 = {}#
constexpr detail::placeholder<7> _7 = {}#
constexpr detail::placeholder<8> _8 = {}#
constexpr detail::placeholder<9> _9 = {}#
namespace serialization#

Functions

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

Functions

template<typename F, typename... Ts>  HPX_DEPRECATED_V (1, 8, "hpx::util::bind is deprecated, use hpx::bind instead") const expr decltype(auto) bind(F &&f

Variables

Ts && ts  {returnhpx::bind(HPX_FORWARD(F, f), HPX_FORWARD(Ts, ts)...)
namespace placeholders#

Functions

HPX_DEPRECATED_V (1, 8, "hpx::placeholders::_1 is deprecated, use hpx::placeholders::_1 " "instead") inline const expr hpx
HPX_DEPRECATED_V (1, 8, "hpx::placeholders::_2 is deprecated, use hpx::placeholders::_2 " "instead") inline const expr hpx
HPX_DEPRECATED_V (1, 8, "hpx::placeholders::_3 is deprecated, use hpx::placeholders::_3 " "instead") inline const expr hpx
HPX_DEPRECATED_V (1, 8, "hpx::placeholders::_4 is deprecated, use hpx::placeholders::_4 " "instead") inline const expr hpx
HPX_DEPRECATED_V (1, 8, "hpx::placeholders::_5 is deprecated, use hpx::placeholders::_5 " "instead") inline const expr hpx
HPX_DEPRECATED_V (1, 8, "hpx::placeholders::_6 is deprecated, use hpx::placeholders::_6 " "instead") inline const expr hpx
HPX_DEPRECATED_V (1, 8, "hpx::placeholders::_7 is deprecated, use hpx::placeholders::_7 " "instead") inline const expr hpx
HPX_DEPRECATED_V (1, 8, "hpx::placeholders::_8 is deprecated, use hpx::placeholders::_8 " "instead") inline const expr hpx
HPX_DEPRECATED_V (1, 8, "hpx::placeholders::_9 is deprecated, use hpx::placeholders::_9 " "instead") inline const expr hpx