Convert lambda with capture clause stored in std::function to raw function pointer

后端 未结 2 1156
旧巷少年郎
旧巷少年郎 2021-01-18 06:29

Since my last recent question was unfortunately worded and resulted in a solution to another problem then mine, here I will try to formulate my actual problem in a clear way

2条回答
  •  日久生厌
    2021-01-18 07:01

    You can convert a capturing lambda/functor into a function pointer, but you need to be careful when doing it:

    https://codereview.stackexchange.com/questions/79612/c-ifying-a-capturing-lambda

提交回复
热议问题