constructor-overloading

Why does pybind fail for functions without arguments?

Why does pybind fail for functions without arguments? Question: I have an overloaded constructor in C++ (default + other). My automatically generated pybind code looks like this: py::class_<MyClass>(m, "MyClass") .def( py::init<>(), py::kw_only() ) .def( py::init< std::valarray<std::string> >(), py::kw_only(), py::arg("my_var") ) When I delete the first constructor everything works fine. But for the first one I …

Total answers: 1