/// 形 [capture list](parameter list)->return type{function body} /// parameter list and return type can be omitted []{ return 1}
一般用于只有一处要使用的地方,例如sort函数的排序方法,如果需要多处使用,应该好好定义一个函数
cpp_lambda函数
原文:https://www.cnblogs.com/codersyl/p/14816354.html