Is there an equivalent to the range-based enumerate loop from python in C++? I would imagine something like this.
enumerate
enumerateLoop (auto counter, a
Tobias Widlund wrote a nice MIT licensed Python style header only enumerate (C++17 though):
GitHub
Blog Post
Really nice to use:
std::vector my_vector {1,3,3,7}; for(auto [i, my_element] : en::enumerate(my_vector)) { // do stuff }