Open utterances-bot opened 8 months ago
From my experiment, is it true that we can only move a new variable into a closure, but cannot write its type out explicitly and cannot simply create a new variable, e.g. cannot do [int c = std::move(x)] () { ... }
or [int c] () { ... }
?
C++ Lambdas Introduction | hacking C++
A short introduction to C++'s auto-generated function classes known as lambdas.
https://hackingcpp.com/cpp/lang/lambda_basics.html