hpx/execution/algorithms/sender_future.hpp#

Defined in header hpx/execution/algorithms/sender_future.hpp.

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

Converts any P2300 stdexec sender into an hpx::future<T>.

Usage:

// Explicit T:
auto sender = stdexec::just(42) | stdexec::then([](int x){ return x; });
hpx::future<int> f =
    hpx::execution::experimental::as_future<int>(std::move(sender));
int val = f.get();   // == 42

namespace hpx
namespace execution
namespace experimental

Variables

template<typename T>
constexpr as_future_t<T> as_future = {}#
template<typename T>
struct as_future_t#

Public Functions

template<typename Sender, typename = std::enable_if_t<hpx::execution::experimental::is_sender_v<std::decay_t<Sender>>>>
inline constexpr hpx::future<T> operator()(Sender &&sender) const#