mardi 3 mai 2016

How do I typedef a method pointer with the C++11 using syntax?

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?)

Aucun commentaire:

Enregistrer un commentaire