Hello there, I tried to print out addresses of class methods. But i have noted that they are greater then 'long long int'. So here is the question, how could i grasp them if they are 128 bit? Exists a data type greater then 'ull' ?
The problem is that pointer-to-member functions on some implementations contain a lot of extra baggage.
According to Don Clugston, Visual C++'s member function pointers actually vary in size (!) depending on the nature of the class that they belong to and compiler settings.
You can't really do meaningful pointer arithmetic with them (at least not sanely), so why do you need them as an integer? You can declare a member-function pointer by writing return_type (class_name::*var_name)(function_parameters) = your_function;
But perhaps it's better to use a typedef return_type (class_name::*type_alias)(function_parameters);
Further, C++ offers no guarantees about the size of its data types, except in relative terms and that char is one machine byte.
In my opinion, you probably shouldn't really use raw member function pointers anyway. I think that when you need to bring stateful objects into the mix you should consider using <functional>.