Callbacks, allowing ptr to member with arg. binding
I'm using a library where to I can pass a function pointer which is later called by the library. I would like to be able to pass a pointer-to-member instead of a normal function pointer to the library.
I read somewhere that this should be possible with argument binding; binding a class instance as the first parameter.
I've tried to use boost.bind, with no success. Here is roughly what I tried:
someAPI->setEventFunction(x, bind(&MyClass::myFunc, this, _1, _2, _3)); // called from MyClass method
But it says that it can't convert from the boost.bind template to a normal function pointer. Is there a solution to this, without altering the library?