Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
LGTM.
(Now, that C++ has lambdas, etc, I wonder if using a standard find algorithm would be even simpler/cleaner?)
Comment Actions
I played around with it but couldn't find a use of find_if which worked with enumerate that I was happier with. You still have to grab iterators, check against end and deref to return the index so imho it's not much clearer to read. Plus I got a bit scared about whether enumerate is to be stable when called twice on the same range: once for find_if and once for end..