You use the same rules for "lambda"s that you would for any object that you take as a parameter.
A function should use non-const reference if the intent of the function is to modify the object for the caller. The function should use const&
if it is just using the object without changing it. And it should pass by value if it is going to copy/move the object into its internal storage.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…