pass function by value (?) instead of function pointer?

前端 未结 4 2225
醉酒成梦
醉酒成梦 2020-12-18 22:28

Sorry if this has been asked before, but I was unable to find it.

So im trying to educate myself about templates and the new C++11 features (mainly lambdas, somethin

4条回答
  •  一个人的身影
    2020-12-18 22:58

    In C++, functions are not first-class objects, which means “function as value” makes no sense in it. That's why function name has always been implicitly convertible to pointer to it.

提交回复
热议问题