MCPcopy Create free account
hub / github.com/andreasfertig/programming-with-cpp20 / main

Function main

03.13-rangesCommonView1/main.cpp:10–20  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8# include <vector>
9
10int main()
11{
12# ifdef WILL_FAIL
13 auto v = std::vector{3, 5, 6, 7, 9};
14 auto rng =
15 v | std::views::take_while([](int x) { return x > 5; });
16 const auto res = std::accumulate(rng.begin(), rng.end(), 0);
17 std::cout << res << '\n';
18
19# endif
20}
21#else
22int main()
23{

Callers

nothing calls this directly

Calls 2

beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected