> For the complete documentation index, see [llms.txt](https://wandersofb.gitbook.io/blog/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wandersofb.gitbook.io/blog/c++/ji-ben-yu-fa/lambda.md).

# lambda

`[](){}` 之前在学 scip 的时候已经很熟了，不过 C++ 的 lambda 多了个捕获列表，这个列表是针对一些外部变量的。如果我想在函数体内使用一些外部变量那么就要指定捕获列表是复制 `[=]` 还是引用 `[&]` 捕获。还有一些修饰符例如：`mutable` 允许函数体修改复制捕获 `[=]` 的对象、 `constexpr` 暂时不知道。
