- - , - capturimg by [&] . , , ot " ".
, , ,
. = (, int ) , mutable lambdas.
If, however, your closure is experiencing a local area, the &capture is unsafe, and I would even advise against =- capture explicitly and ensure that all captured pointers have a sufficient lifetime.
For pointers, in particular, changing the pointer is completely different from changing the indicated directions. Capturing a copy of the pointer when you do not change the pointer itself will not cause any problems.
source
share