Quantcast
Channel: User Peter - Reinstate Monica - Stack Overflow
Viewing all articles
Browse latest Browse all 223

Answer by Peter - Reinstate Monica for std::iota is very limited

$
0
0

With strides from C++23 you can write

iota(0) | stride(2)

instead of

iota(0) | filter([](auto i) { return i % 2 == 0; })

which feels much more clumsy and unnecessarily computing intensive (even if the compilers can perhaps produce something simpler from it).


Viewing all articles
Browse latest Browse all 223

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>