Is there any (useful?) difference between:
auto test = [..](..){..};
and
const auto test = [..](..){..};
?
Yes, if the lambda is declared mutable
then you cannot call it in the second case.
int x = 0;
const auto test = [x]() mutable { ++x; };
test(); // error
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With