Given some_type
with a member function f
it is possible to determine f
's signature like this (and say let us place it in a tuple):
template <typename R, typename T, typename... A>
std::tuple<R, A...> signature_of_impl(R (T::*)(A...));
template <typename T>
using signature_of_member_f = decltype(signature_of_impl(&T::f));
struct some_type
{
int f(char, float);
};
using some_type_f_signature = signture_of_member_f<some_type>;
This obviously fails badly if f
is overloaded. Is it possible to determine signatures of all existing overloads of f
within some_type
?