Hi:
Sorry, it's my error, the compile error is because of call_method<>,
and call_method<void> is OK!
struct Base
{
virtual int f() =
0;
virtual Base* clone() =
0;
virtual void g() =
0;
};
struct BaseWrap : Base
{
BaseWrap(PyObject*
self_)
:
self(self_) {}
int f() { return
call_method<int>(self, "f"); }
file://void g() {call_method<>(self, "g");
}//compile error
void g()
{call_method<void>(self, "g");
}//ok
Base* clone(){ return
call_method<Base*>(self,
"clone");}
PyObject*
self;
};
kemeng