Is this possible in a C ++ call class method with explicit passing of the first parameter "this" param?
Something like that:
struct A { void some() {} }; .... A a; A::some(&a);
For the reasonable question βWHY?β: I need to implement std :: bind analogue, and it works fine with such constructs:
void f(int); bind(f, 3);
but this does not work:
bind(&A::some, &a);
UPDATE: Guys, my question is obviously not entirely clear. I know how to use std :: bind, I want to know how it handles constructs where this parameter is explicitly passed to it: std :: bind (& A :: some, & a);
source share