Can a lambda expression be passed as function pointer?

后端 未结 5 1990
忘掉有多难
忘掉有多难 2021-02-05 02:49

I am trying to pass a lambda expression to a function that takes a function pointer, is this even possible?

Here is some sample code, I\'m using VS2010:

         


        
5条回答
  •  长发绾君心
    2021-02-05 03:41

    No. It cannot. Not dependably at least. I know that VS2010 implements them as object functors. Based on how they work that may be an a priori requirement.

提交回复
热议问题