diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index c8105fd2e..73fbe9a83 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -1005,6 +1005,7 @@ struct error_scope { PyObject *type, *value, *trace; error_scope() { PyErr_Fetch(&type, &value, &trace); } error_scope(const error_scope &) = delete; + error_scope &operator=(const error_scope &) = delete; ~error_scope() { PyErr_Restore(type, value, trace); } };