'c++ Extract parameter type list from function pointer
Im trying to get the argument types from a function pointer
This should be the working end product
std::function<void(TestAppObject*, MemberFuncArgs<decltype(&TestAppObject::TestMethod)>::InputArgs)> func = &TestAppObject::TestMethod;
Current MemberFuncArgs class
template<typename T>
struct MemberFuncArgs;
template<typename RT, typename Owner, typename ...Args>
struct MemberFuncArgs<RT(Owner::*)(Args...)>
{
static const size_t ArgCount = sizeof...(Args);
typedef RT ReturnType;
typedef Args InputArgs;
};
Compiler throws the error 'Args': parameter pack must be expanded in this context.
I just need a way to extract the Args... type from the function pointer, its probably just a syntax issue that im too dumb to see...
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
