Lhcfl / Lhcfl.github.io

https://lhcfl.github.io/
1 stars 0 forks source link

C++11与lambda · Lhc_fl Home #6

Open Lhcfl opened 2 years ago

Lhcfl commented 2 years ago

https://lhcfl.github.io/2022/09/02/lambda-in-cpp/

废话不说,直接上定义: 1capture -> ret {something;} 其中 capture 是捕获列表,params 是参数表,opt 是函数选项,ret 是返回值类型,something是函数体。 二话不讲,上个例子: 12auto f =