Pybind11: passing a string* argument to a constructor
问题 In a C++ library that I'm not allowed to change I have a constructor that looks like this: Dfa(const int n_state, const int dim_alf, const string *alf); If I simply bind with .def(py::init<const int, const int, const std::string*>()) it compiles succesfully. The problem is that I can't pass a string* by python, because for example if I try to execute on python alph=['x','y'] z=Dfa(3,2,alph) It returns the following error: TypeError: __init__(): incompatible constructor arguments. The