diff --git a/_pyceres/core/solver.h b/_pyceres/core/solver.h index 5eaca60..68f259f 100644 --- a/_pyceres/core/solver.h +++ b/_pyceres/core/solver.h @@ -16,8 +16,9 @@ void BindSolver(py::module& m) { py::call_guard()); using Options = ceres::Solver::Options; - py::class_ PyOptions(m, "SolverOptions"); + py::class_> PyOptions(m, "SolverOptions"); PyOptions.def(py::init<>()) + .def(py::init()) .def("IsValid", &Options::IsValid) .def_property( "callbacks", @@ -131,8 +132,9 @@ void BindSolver(py::module& m) { MakeDataclass(PyOptions); using Summary = ceres::Solver::Summary; - py::class_ PySummary(m, "SolverSummary"); + py::class_> PySummary(m, "SolverSummary"); PySummary.def(py::init<>()) + .def(py::init()) .def("BriefReport", &Summary::BriefReport) .def("FullReport", &Summary::FullReport) .def("IsSolutionUsable", &Summary::IsSolutionUsable) @@ -231,8 +233,10 @@ void BindSolver(py::module& m) { MakeDataclass(PySummary); using IterSummary = ceres::IterationSummary; - py::class_ PyIterSummary(m, "IterationSummary"); + py::class_> PyIterSummary( + m, "IterationSummary"); PyIterSummary.def(py::init<>()) + .def(py::init()) .def_readonly("iteration", &IterSummary::iteration) .def_readonly("step_is_valid", &IterSummary::step_is_valid) .def_readonly("step_is_nonmonotonic", &IterSummary::step_is_nonmonotonic)