I have a question involving functional template arguments to template classes in C++.
I\'d like to define a template class Foo
taking a single template
Declare a primary template and leave it unimplemented.
template<typename T>
struct foo; // unimplemented primary template
Then provide a partial specialization that matches function types as the template argument.
template<typename Result, typename... Args>
struct foo<Result(Args...)>
{
using args_t = std::tuple<Args...>;
};
You can access the nested type as
foo<decltype(bar)>::args_t
Live demo