MCPcopy Create free account
hub / github.com/NVIDIA/stdexec / async_answer

Function async_answer

examples/hello_coro.cpp:26–31  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24
25template <sender S1, sender S2>
26auto async_answer(S1 s1, S2 s2) -> stdexec::task<int>
27{
28 // Senders are implicitly awaitable (in this coroutine type):
29 co_await static_cast<S2&&>(s2);
30 co_return co_await static_cast<S1&&>(s1);
31}
32
33template <sender S1, sender S2>
34auto async_answer2(S1 s1, S2 s2) -> stdexec::task<std::optional<int>>

Callers 1

async_answer2Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected