As per disscussion in D83351, using for_each is potentially confusing,
at least in regards to inconsistent style (there's less than 100 for_each
usages in LLVM, but ~100.000 for range-based loops
Therefore, it should be avoided.
Differential D83431
[Docs] CodingStandards: for_each is discouraged lebedev.ri on Jul 8 2020, 3:00 PM. Authored by
Details As per disscussion in D83351, using for_each is potentially confusing, Therefore, it should be avoided.
Diff Detail
Event Timeline
Comment Actions
Probably could drop those adjectives. =P Also, s/disscussion/discussion/.
I guess @dblaikie did use the term confusing, but it might be useful to better reflect his point about confusion in regards to inconsistent style in the commit message. It certainly begs the question otherwise.
Comment Actions It's okay if no new labmbda is needed though.
|
Even if what's available in the context of the code is a pair of iterators and a callable (and using a range-based for loop would involve extra boilerplate)?