I'd like to write this
class A {
...
};
typedef void (A::*MethodPtr)();
using using
. How would I do that?
Would appreciate answers both with and without using type_traits
.
(The answer for regular functions can be found here: How do I typedef a function pointer with the C++11 using syntax?)
using MethodPtr = void (A::*)();
Quite similar to a function pointer, in fact.