I am trying to convert a member function pointer to standard C function pointer without success.
I tried different methods but I miss something.
My problem is that I need to call a library's function that takes as argument a functor:
void setFunction(void(*cbfun)(float*,int,int,int,int)){ ... }
inside a class in this way:
class base_t {
public:
void setCallback(){
setFunction(&_callback);
}
private:
void _callback(float * a, int b, int c, int d, int e) { ... }
};
Unfortunately, the _callback() function cannot be static.
I'm also tried to use std::bind but without fortune.
Is there any way I can pass the member to the function?