<div dir="ltr">I frequently find myself resorting to index based enumeration because ranged based fors do not allow you to access the index.  With llvm::enumerate(), you can write something like this:<div><br></div><div>for (auto X : enumerate(my_container)) {</div><div>  if (X.Index == 1)</div><div>    continue;</div><div>  printf("%d", X.Value);</div><div>}</div><div><br></div><div>It handles both const and non-const containers, so that for non-const containers you can modify the underlying sequence item (e.g. the `Value` member of the returned enumerator is a reference).</div><div><br></div><div>Phab is down for now so I'm using a regular email, but if this is too inconvenient i can wait for Phab to come back up and resubmit.</div></div>