Also add error_scope assignment operator to complete the rule-of-3 (follow-on to PR #3870). (#3872)

This commit is contained in:
Ralf W. Grosse-Kunstleve 2022-04-15 11:44:48 -07:00 committed by GitHub
parent 3829b7624c
commit 30716c67a1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -993,6 +993,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); }
};