Since C++11 introduced the range-based for loop (range-based for in c++11), what is the neatest way to express looping over a range of integers?
Instead of
The neatest way is still this:
for (int i=0; i
I guess you can do this, but I wouldn't call it so neat:
#include int main() { for ( auto i : { 1,2,3,4,5 } ) { std::cout<