Detect if C++ lambda can be converted to function pointer
问题 I have some code that generates assembly for a JIT idea I'm working on. I use meta-programming to generate calls by analyzing the function type and then generating the correct assembly to call it. I recently wanted to add lambda support, and lambdas have two versions, non-capturing (normal __cdecl function call) and capturing (__thiscall, member-function call with the lambda object as context). __thiscall is slightly more expensive so I'd like to avoid it whenever possible, and I'd also like