#include <iostream>
#define PRINT_FUNC() {std::cout << __PRETTY_FUNCTION__ << std::endl;}
struct Obj {
Obj(){PRINT_FUNC();}
int run (float f, char *c) {
PRINT_FUNC();
return 0;
}
int fly () {
PRINT_FUNC();
return 0;
}
};
template <typename OBJ, typename Method, typename ... Args>
void call_obj_func (OBJ &&o, const Method&fn, Args&& ... args) {
PRINT_FUNC();
(std::forward<OBJ>(o).*fn)(std::forward<Args>(args)...);
}
int main () {
Obj o;
call_obj_func(o, &Obj::fly);
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKI2RlZmluZSBQUklOVF9GVU5DKCkge3N0ZDo6Y291dCA8PCBfX1BSRVRUWV9GVU5DVElPTl9fIDw8IHN0ZDo6ZW5kbDt9CgpzdHJ1Y3QgT2JqIHsKICAgIE9iaigpe1BSSU5UX0ZVTkMoKTt9CiAgICBpbnQgcnVuIChmbG9hdCBmLCBjaGFyICpjKSB7CiAgICAgICAgUFJJTlRfRlVOQygpOwogICAgICAgIHJldHVybiAwOwogICAgfQoKICAgIGludCBmbHkgKCkgewogICAgICAgIFBSSU5UX0ZVTkMoKTsKICAgICAgICByZXR1cm4gMDsKICAgIH0KfTsKCnRlbXBsYXRlIDx0eXBlbmFtZSBPQkosIHR5cGVuYW1lIE1ldGhvZCwgdHlwZW5hbWUgLi4uIEFyZ3M+CnZvaWQgY2FsbF9vYmpfZnVuYyAoT0JKICYmbywgY29uc3QgTWV0aG9kJmZuLCBBcmdzJiYgLi4uIGFyZ3MpIHsKICAgIFBSSU5UX0ZVTkMoKTsKICAgIChzdGQ6OmZvcndhcmQ8T0JKPihvKS4qZm4pKHN0ZDo6Zm9yd2FyZDxBcmdzPihhcmdzKS4uLik7Cn0KCmludCBtYWluICgpIHsKICAgIE9iaiBvOwogICAgY2FsbF9vYmpfZnVuYyhvLCAmT2JqOjpmbHkpOwp9