mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-27 14:20:34 +05:00
Fix copying BitArray in immediate operators in python bindings
This commit is contained in:
parent
cef04cfd2a
commit
67a67a453d
@ -141,10 +141,16 @@ 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,
|
#ifdef __clang__
|
||||||
// .def(py::self &= py::self) // see https://github.com/pybind/pybind11/issues/1893
|
// see https://github.com/pybind/pybind11/issues/1893
|
||||||
.def("__ior__", [](BitArray& lhs, const BitArray& rhs) { return lhs |= rhs; }, py::is_operator())
|
#pragma GCC diagnostic push
|
||||||
.def("__iand__", [](BitArray& lhs, const BitArray& rhs) { return lhs &= rhs; }, py::is_operator())
|
#pragma GCC diagnostic ignored "-Wself-assign-overloaded"
|
||||||
|
#endif
|
||||||
|
.def(py::self |= py::self)
|
||||||
|
.def(py::self &= py::self)
|
||||||
|
#ifdef __clang__
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
|
#endif
|
||||||
.def(~py::self)
|
.def(~py::self)
|
||||||
;
|
;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user