I am surprised that this question has not been asked before on SO (well, at least I could not find it).
Have you ever created a method callback template (something like a "pointer" to a class method) in C ++, and if so, how did you do it?
I know that a method is just a regular function with some hidden this parameter to use as context, and I have a pretty simple design. However, since things are often more complex than they seem, I wonder how our C ++ gurus implement this, preferably in an elegant and standard way.
All suggestions are welcome!
ereOn source share