lambda表达式

C++11 的新特性:Lambda 表达式CONFIG += c++11

// 返回值
// 值传递 [=](){} 若要修改值需要家`mutable`关键字[=]()mutable{}
// 引用传递 [&](){}
int ret = []()->int{return 10000;}();

posted on 2021-05-18 21:53  lodger47  阅读(27)  评论(0)    收藏  举报

导航