From 30716c67a16fca836c447a263a87025ba080a6f2 Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Fri, 15 Apr 2022 11:44:48 -0700 Subject: [PATCH] Also add error_scope assignment operator to complete the rule-of-3 (follow-on to PR #3870). (#3872) --- include/pybind11/detail/common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/pybind11/detail/common.h b/include/pybind11/detail/common.h index b49313e44..a130ebea0 100644 --- a/include/pybind11/detail/common.h +++ b/include/pybind11/detail/common.h @@ -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); } };