Registry / async / boost-coroutine

boost-coroutine

JSON →
library1.90.0vcpkgunverified

Boost coroutine module.

async
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.

#include <boost/coroutine/coroutine.hpp>

Generate Fibonacci numbers using coroutines

#include <boost/coroutine/coroutine.hpp> #include <iostream> typedef boost::coroutines::coroutine<int()> coro_t; void fibonacci(coro_t::push_type &sink) { int first = 1, second = 1; sink(first); sink(second); for (int i = 0; i < 8; ++i) { int third = first + second; first = second; second = third; sink(third); } } int main() { coro_t::pull_type source(fibonacci); for (int i : source) { std::cout << i << ' '; } return 0; }
Debug
Known footguns
breakingBoost.Coroutine is deprecated in favor of Boost.Coroutine2 or C++20 coroutines.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
21 hits · last 30 days
bytedance
5
gptbot
3
amazonbot
3
claudebot
3
mj12bot
1
Resources

No resource links recorded.