Skip to content

Commit 30716c6

Browse files
authored
Also add error_scope assignment operator to complete the rule-of-3 (follow-on to PR #3870). (#3872)
1 parent 3829b76 commit 30716c6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

include/pybind11/detail/common.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -993,6 +993,7 @@ struct error_scope {
993993
PyObject *type, *value, *trace;
994994
error_scope() { PyErr_Fetch(&type, &value, &trace); }
995995
error_scope(const error_scope &) = delete;
996+
error_scope &operator=(const error_scope &) = delete;
996997
~error_scope() { PyErr_Restore(type, value, trace); }
997998
};
998999

0 commit comments

Comments
 (0)