We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Since our pybind11 integrations were developed when master was still on c++11, we missed out on some of the syntactical niceties such as:
https://pybind11.readthedocs.io/en/stable/classes.html?highlight=overloaded#overloaded-methods
where
py::class_<Pet>(m, "Pet") .def(py::init<const std::string &, int>()) .def("set", static_cast<void (Pet::*)(int)>(&Pet::set), "Set the pet's age") .def("set", static_cast<void (Pet::*)(const std::string &)>(&Pet::set), "Set the pet's name");
becomes
py::class_<Pet>(m, "Pet") .def("set", py::overload_cast<int>(&Pet::set), "Set the pet's age") .def("set", py::overload_cast<const std::string &>(&Pet::set), "Set the pet's name");
This can be done in the in-tree bindings, but more importantly should be updated in the modtool template and bindtool
The text was updated successfully, but these errors were encountered:
we're doing this here and there in the tree right now! ❤️
I don't think we'll spend energy on converting the existing codebase to do it everywhere, though.
Sorry, something went wrong.
No branches or pull requests
Since our pybind11 integrations were developed when master was still on c++11, we missed out on some of the syntactical niceties such as:
https://pybind11.readthedocs.io/en/stable/classes.html?highlight=overloaded#overloaded-methods
where
becomes
This can be done in the in-tree bindings, but more importantly should be updated in the modtool template and bindtool
The text was updated successfully, but these errors were encountered: