Say I have a simple C++ class
class MyClass{
//constructor
MyClass(int value):_value(value){};
void operator()(AnotherClass& const b){
// Do something with b object
}
private:
int _value;
}
I am trying to create Python binding of this class using pybind11. How can I bind the operator() method?
This binding is going to be used to pass objects of this class to functions requiring a callback function as an argument.