| 8 | # include <vector> |
| 9 | |
| 10 | int 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 |
| 22 | int main() |
| 23 | { |