When running a c++ class member function from python, i get this error: No Python class registered for C++ class std::string The member function is:
class holiday_calendar {
public:
const std::string& get_name() const;
void set_name(const std::string&);
};
I have used this exposing code
class_<holiday_calendar>("holiday_calendar")
.def("getname", &holiday_calendar::get_name, return_internal_reference<>())
.def("setname", &holiday_calendar::set_name);
I can instantiate the object holiday_calendar, I can call setname('SOMENAME') on it but calling getname() fails with the above error