MCPcopy Create free account
hub / github.com/Codesire-Deng/co_context / run

Function run

test/move_shared_task.cpp:9–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7}
8
9task<> run() {
10 auto t = f();
11 std::cout << co_await t << "\n";
12 std::cout << co_await t << "\n";
13 auto str = co_await std::move(t);
14 std::cout << "str: " << str << "\n";
15 std::cout << co_await t << "\n";
16 str = std::move(co_await t);
17 std::cout << "str: " << str << "\n";
18 std::cout << co_await t << "\n"; // empty string
19}
20
21int main() {
22 io_context ctx;

Callers 1

mainFunction · 0.70

Calls 1

fFunction · 0.70

Tested by

no test coverage detected