Sheesh, I can't even get a parent callback to point to a parent method.
Here are some of the responses:
callback = blankfunc; // error: argument of type ‘void (HadronServer::)()’ does not match ‘void (*)()’
callback = (void*)blankfunc; // error: invalid use of member (did you forget the ‘&’ ?)
callback = (void*)blankfunc(); // error: void value not ignored as it ought to be
callback = (void*)&blankfunc(); // error: invalid lvalue in unary ‘&’
callback = (void *)test; // error: invalid conversion from ‘void*’ to ‘void (*)()’
callback = &test; // works, but test is not a member function
callback = &blankfunc; // error: ISO C++ forbids taking the address of an unqualified or parenthesized non-static member function to form a pointer to member function. Say ‘&HadronServer::blankfunc’
callback = &HadronServer::blankfunc; // error: cannot convert ‘void (HadronServer::*)()’ to ‘void (*)()’ in assignment
callback = &((void*)blankfunc); // error: invalid use of member (did you forget the ‘&’ ?)
callback = (void *)(&blankfunc); // error: ISO C++ forbids taking the address of an unqualified or parenthesized non-static member function to form a pointer to member function. Say ‘&HadronServer::blankfunc’
callback = (void *)(&HadronServer::blankfunc); // error: converting from ‘void (HadronServer::*)()’ to ‘void*’
callback = blankfunc; // error: argument of type ‘void (HadronServer::)()’ does not match ‘void (*)()’
callback = (void*)blankfunc; // error: invalid use of member (did you forget the ‘&’ ?)
callback = (void*)blankfunc(); // error: void value not ignored as it ought to be
callback = (void*)&blankfunc(); // error: invalid lvalue in unary ‘&’
callback = (void *)test; // error: invalid conversion from ‘void*’ to ‘void (*)()’
callback = &test; // works, but test is not a member function
callback = &blankfunc; // error: ISO C++ forbids taking the address of an unqualified or parenthesized non-static member function to form a pointer to member function. Say ‘&HadronServer::blankfunc’
callback = &HadronServer::blankfunc; // error: cannot convert ‘void (HadronServer::*)()’ to ‘void (*)()’ in assignment
callback = &((void*)blankfunc); // error: invalid use of member (did you forget the ‘&’ ?)
callback = (void *)(&blankfunc); // error: ISO C++ forbids taking the address of an unqualified or parenthesized non-static member function to form a pointer to member function. Say ‘&HadronServer::blankfunc’
callback = (void *)(&HadronServer::blankfunc); // error: converting from ‘void (HadronServer::*)()’ to ‘void*’
To copy to clipboard, switch view to plain text mode
So it only works when I point it at a non-member function.
Bookmarks