I've recently learned that I cannot:
- Take the address of an undefined function
- Take the address of a templatized function with a type it would fail to compile for
But I've also recently learned that I can call decltype
to get the return type of said function
So an undefined function:
int foo(char, short);
I'd like to know if there's a way that I can match the parameter types to the types in a tuple
. This is obviously a meta programming question. What I'm really shooting for is something like decltypeargs
in this example:
enable_if_t<is_same_v<tuple<char, short>, decltypeargs<foo>>, int> bar;
Can anyone help me understand how decltypeargs
could be crafted?