https://www.cprogramming.com/c++11/c++11-lambda-closures.html
https://www.cnblogs.com/lidabo/p/3908663.html
auto handle = [] () {
};
- 閉包 []
閉包的作用是對(duì)外部變量的捕捉(capture)
[] Capture nothing (or, a scorched earth strategy?)
[&] Capture any referenced variable by reference
[=] Capture any referenced variable by making a copy
[=, &foo] Capture any referenced variable by making a copy, but capture variable foo by reference
[bar] Capture bar by making a copy; don't copy anything else
[this] Capture the this pointer of the enclosing class - 參數(shù)列表 ()
- 函數(shù)體{}
后續(xù)補(bǔ)充