So I figured something out, and while its not the most pretty it does work. I made a function to build a tuple of the specified type out of a string, then I just used that in place of make_tuple.
Code:
template <typename Head, typename... Tail>
std::tuple<Head, Tail...> StringToTuple(std::tuple<Head, Tail...>, std::string& args)
{
auto head = std::make_tuple(GetToken<Head>(args));
return std::tuple_cat(head, StringToTuple(std::tuple<Tail...>(), args));
}
std::tuple<> StringToTuple(std::tuple<>, std::string& args)
{
return std::tuple<>();
}
template <typename R, typename... Args>
R ApplyString(std::function<R(Args...)> func, std::string args)
{
std::tuple<Args...> argtuple = StringToTuple(std::tuple<Args...>(), args);
return ApplyTuple(func, argtuple);
}
It does work now but if anyone has a better solution, please post it. Cheers!