Registry / async / cppcoro

cppcoro

JSON →
library2022-10-25vcpkgunverified

A library of C++ coroutine abstractions for the Coroutines TS.

vcpkg install cppcoro
INSTALL
IMPORT
SIG · CPPCORO
C
cppcoro
asynccppv2022-10-25
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

cppcoro/coroutine.hpp
#include <cppcoro/coroutine.hpp>

Minimal example using cppcoro task and sync_wait.

#include <cppcoro/task.hpp> #include <cppcoro/sync_wait.hpp> #include <iostream> cppcoro::task<int> compute_answer() { co_return 42; } int main() { int result = cppcoro::sync_wait(compute_answer()); std::cout << result << std::endl; return 0; }
Debug
Known issues
gotchacppcoro requires a compiler with Coroutines TS support (e.g., Clang 5+ with -fcoroutines-ts, MSVC 2017 15.3+).
fix
Use a compiler that supports the Coroutines TS and enable the appropriate flag.
affects: *
Upgrade
Version history
2022-10-25latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
28 hits · last 30 days
node
26
Resources

No resource links recorded.

cppcoro — pip install cppcoro · libregistry