I've been searching for an answer for hours, but I didn't find anything... So, Here is my problem:
template<typename Signature> struct wrapper; // (1)
template<typename Ret, typename... Args>
struct wrapper<Ret(Args...)> // (2)
{
function static get(Ret(*fnc)(Args...), Args... args)
{
return function(/*some more stuff here that work*/);
}
}
basically, this code extract the return type and the parameters of a function and return a generic function container. This code work with simple function. But then I tried to use lambdas. Without this wrapper (by handwriting the complete prototype) the code work, and I am able to call lambda. But when I use this wrapper with lambda functions, I get some
'./some-file.cpp:xy:z: error: incomplete type 'wrapper >' used in nested name specifier'
Is the error caused by the two points (1) and (2) because a lambda could not fit into a function pointer ? I am searching a way to get the arguments types of the lambda into a template argument pack (the return type is not important, all my lambdas does not return values (so it's void)) Thanks in advance for your help :)