pybind11 wraps the lambda:
.def(py::init([](const FCNBase &fcn,
const MnUserParameters &par,
unsigned int stra) {
return MnMigrad(fcn, par, MnStrategy(stra));
}), "fcn"_a, "par"_a, "stra"_a = 1);
nanobind placement-news into __init__:
.def("__init__", [](MnMigrad *self,
const FCNBase &fcn,
const MnUserParameters &par,
unsigned int stra) {
new (self) MnMigrad(fcn, par, MnStrategy(stra));
}, "fcn"_a, "par"_a, "stra"_a = 1);