MCPcopy Create free account
hub / github.com/andreasfertig/cppinsights / seq

Function seq

tests/EduCoroutineBinaryExprTest.cpp:35–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33
34
35generator seq(int start) {
36 for (int i = start;; ++i) {
37 // This definition must go into the coroutine frame
38 struct S { int t; char c; };
39
40 S s{};
41
42 co_yield s.t;
43 (void)(co_yield i);
44 static_cast<void>(co_yield i);
45 co_yield i+1;
46 }
47}
48
49int main() {
50 auto s = seq(3);

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected