Hacker News new | ask | show | jobs
by anon291 17 days ago
You can do this right now with an iterator adaptor and some range trickery. The c++ range based for loop already enables the same behavior as python. The only thing missing is a standard enumerate function.

This is a Fine addition to c++ due to how c++ uses lifetimes for resource management but the syntax is convoluted and the claim that this is intended to enable enumeration is... Just silly.