Registry / utility / tl-generator

tl-generator

JSON →
library2021-09-28vcpkgunverified

Single-header, ranges-compatible generator type built on C++20 coroutines

vcpkg install tl-generator
INSTALL
IMPORT
SIG · TL-GENERATOR
T
tl-generator
utilitycppv2021-09-28
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.

tl/generator.hpp
✓ #include <tl/generator.hpp>

Generate Fibonacci numbers using coroutines

#include <tl/generator.hpp> #include <iostream> tl::generator<int> fibonacci() { int a = 0, b = 1; while (true) { co_yield a; auto next = a + b; a = b; b = next; } } int main() { for (auto i : fibonacci()) { if (i > 100) break; std::cout << i << ' '; } }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
2021-09-28latest on vcpkg
Audit
Dependencies

No dependency data recorded yet.

Agent activity
19 hits · last 30 days
node
18
Bingbot
1
Resources

No resource links recorded.

tl-generator — pip install tl-generator · libregistry