diff --git a/libsrc/core/python_ngcore_export.cpp b/libsrc/core/python_ngcore_export.cpp index d8666e6a..73bba40e 100644 --- a/libsrc/core/python_ngcore_export.cpp +++ b/libsrc/core/python_ngcore_export.cpp @@ -141,8 +141,10 @@ PYBIND11_MODULE(pyngcore, m) // NOLINT .def(py::self | py::self) .def(py::self & py::self) - .def(py::self |= py::self) - .def(py::self &= py::self) + // .def(py::self |= py::self) // false clang warnings, + // .def(py::self &= py::self) // see https://github.com/pybind/pybind11/issues/1893 + .def("__ior__", [](BitArray& lhs, const BitArray& rhs) { return lhs |= rhs; }, py::is_operator()) + .def("__iand__", [](BitArray& lhs, const BitArray& rhs) { return lhs &= rhs; }, py::is_operator()) .def(~py::self) ; diff --git a/libsrc/geom2d/python_geom2d.cpp b/libsrc/geom2d/python_geom2d.cpp index dc6ae29c..99ab617c 100644 --- a/libsrc/geom2d/python_geom2d.cpp +++ b/libsrc/geom2d/python_geom2d.cpp @@ -424,7 +424,8 @@ NGCORE_API_EXPORT void ExportGeom2d(py::module &m) .def(py::self-py::self) .def(py::self*py::self) .def(py::self+=py::self) - .def(py::self-=py::self) + // .def(py::self-=py::self) // false clange warning, see https://github.com/pybind/pybind11/issues/1893 + .def("__isub__", [](Solid2d& lhs, const Solid2d& rhs) { return lhs -= rhs; }, py::is_operator()) .def(py::self*=py::self) .def("Mat", &Solid2d::Mat)