Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/andreasfertig/cppinsights
/ take
Function
take
tests/Issue92.cpp:87–99 ·
view source on GitHub ↗
Source
from the content-addressed store, hash-verified
85
}
86
87
generator<uint32_t> take(generator<uint32_t>& g, uint32_t end)
88
{
89
uint32_t i = 0;
90
for (auto e : g)
91
{
92
if (i >= end)
93
break;
94
95
co_yield e;
96
++i;
97
co_yield i;
98
}
99
}
100
101
uint32_t arr[10];
102
int main()
Callers
1
main
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected