Calling a stateless lambda without an instance (only type)
问题 I'm trying to write a wrapper for a "register callback" type of interface from a C library. The issue is quite complicated by the fact that, the library lets you register "variadic" functions by accepting a list of parameter definitions. Then at callback time, the function is expected to extract its arguments from a type-erased list of arguments. Good old C... The interface I'm trying to create is to accept any function, even a lambda, and automatically generate all the machinery to correctly