My problem is i need to represent a pointer to class's method like integer number. So it's not problem with functions, for example void (*func)()
easy cast to number, but when i trying to cast void (&SomeClass::SomeMethod)
to integer with any ways compiles says it's impossible
C-style cast from 'void(ForthInterpreter::*)()' to long is not alowed
I tried (size_t)&ForthInterpreter::CodeFLiteral
, static_cast<size_t>(&ForthInterpreter::CodeFLiteral)
but i got the same errors. Should to suppose there is a principal differense between pointer to function and method but what is it? And how can i cast it succesfully?
I use clang++ with C++11 version.