语法
// [ capture-list ] ( params ) -> { body }
// [ capture-list ] ( params ) { body }
// [ capture-list ] { body }
// e.g.
int main(int argc, const char * argv[])
{
auto x1 = [](int i){ return i; };
x1(10);
}
语法
// [ capture-list ] ( params ) -> { body }
// [ capture-list ] ( params ) { body }
// [ capture-list ] { body }
// e.g.
int main(int argc, const char * argv[])
{
auto x1 = [](int i){ return i; };
x1(10);
}
相关课程