r253904 - Replace loop with std::any_of, NFC.

Hi,

Should the [=] capture be replaced here with [&] ?
The original reasoning was it’s more efficient to capture DeclModule by value rather than by reference.

Yaron

Hi,

Should the [=] capture be replaced here with [&] ?

That would be my preference/notion - as I was saying on another review, I
think it's probably best to default to [&] for any locally scoped lambda (I
feel more sure about this for a lambda only used within the full expression
where it is defined (ie: in standard algorithm usage), but even probably
the right idea for a lambda declared in a lexical scope and only used there
- not escaped via std::function or similar)

The original reasoning was it's more efficient to capture DeclModule by
value rather than by reference.

Yeah, I figured that was the likely logic - I'd be inclined to just rely on
the optimizers to fix this where useful/necessary & keep a simpler rule of
thumb for the usage.

OK, r254013.