(Click here for a personal note from Marshall Cline.)
C++ FAQ
/
Section 33
/ FAQ 33.12
Section 33:
33.1
Is the type of "pointer-to-member-function" different from "pointer-to-function"?
33.2
How do I pass a pointer-to-member-function to a signal handler, X event callback, system call that starts a thread/task, etc?
33.3
Why do I keep getting compile errors (type mismatch) when I try to use a member function as an interrupt service routine?
33.4
Why am I having trouble taking the address of a C++ function?
33.5
How can I avoid syntax errors when creating pointers to members?
33.6
How can I avoid syntax errors when calling a member function using a pointer-to-member-function?
33.7
How do I create and use an array of pointer-to-member-function?
33.8
How do I declare a pointer-to-member-function that points to a
const
member function?
33.9
What is the difference between the
.*
and
->*
operators?
33.10
Can I convert a pointer-to-member-function to a
void*
?
33.11
Can I convert a pointer-to-function to a
void*
?
33.12
I need something like function-pointers, but with more flexibility and/or thread-safety; is there another way?
33.13
What the heck is a functionoid, and why would I use one?
33.14
Can you make functionoids faster than normal function calls?
33.15
What's the difference between a functionoid and a functor?
[33.12] I need something like function-pointers, but with more flexibility and/or thread-safety; is there another way?
Use a functionoid.