Given
struct A {
int foo(double a, std::string& b) const;
};
I can create a member function pointer like this:
typedef int (A::*PFN_FOO)(double, std::string&) const;
Easy enough, except that PFN_FOO
needs to be updated if A::foo
's signature changes. Since C++11 introduces decltype
, could it be used to automatically deduce the signature and create the typedef?