我有以下功能;
template<typename T, typename U, typename... Parameters>
void transform(void (*func)(Parameters...))
{
auto lambda_function = [func](T args, U params)
{
auto combined = std::tuple_cat(args, params);
helper(func, combined);
};
return lambda_function;
}
我似乎找不到可行的返回类型或调用方式,我希望能够像这样调用它;
auto func = transform<std::tuple<char,int>, std::tuple<const char*>>(f);
func(arg, param);
给定'f','arg'和'param'为;
void f(char arg1, int arg2, const char* arg3);
std::tuple<char,int> arg = std::tuple<char,int>('C',-3);
std::tuple<const char*> param = std::tuple<const char*>("PO");
有人有提示,甚至是解决方案吗?
注意:代码可以在以下位置找到;连锁