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

Function main

examples/hello_coro.cpp:45–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45auto main() -> int
46{
47 STDEXEC_TRY
48 {
49 // Awaitables are implicitly senders:
50 auto [i] = stdexec::sync_wait(async_answer2(just(42), just())).value();
51 std::cout << "The answer is " << i.value() << '\n';
52 }
53 STDEXEC_CATCH(std::exception & e)
54 {
55 std::cerr << "error: " << e.what() << '\n';

Callers

nothing calls this directly

Calls 2

async_answer2Function · 0.85
valueMethod · 0.45

Tested by

no test coverage detected