Using lambda as an argument : std::function or template?

后端 未结 2 1630
孤街浪徒
孤街浪徒 2021-01-03 02:31

I\'m studying c++11 especially interested in lambda.

After some practices, I assumed that lambda closure is an nameless function object.

So I wrote this code

2条回答
  •  忘掉有多难
    2021-01-03 03:12

    You can't avoid it. Lambda is just a class with operator()() overloaded which executes your code. So different code - different classes.

提交回复
热议问题