Closed tcbrindle closed 1 year ago
Even more obviously wrong:
FLUX_FOR(int i, ints(0).take(5)) { std::cout << i << ' '; }
prints the expected 0 1 2 3 4
, but
auto true_ = [](int) { return true; };
FLUX_FOR(int i, ints(0).take(5).filter(true_)) { std::cout << i << ' '; }
prints just 0 1 2 3
Given
then the internal iteration code path returns five elements as expected:
However external iteration misses out the last element:
https://godbolt.org/z/8ozEsj77d