Added deleted copy constructor for error_scope to comply with rule of 3. (#3870)

* Added deleted copy constructor for error_scope to comply with rule of 3.
This commit is contained in:
Oleksandr Pavlyk
2022-04-14 11:16:58 -05:00
committed by GitHub
parent ba7a0fac73
commit 45164c1fcb

View File

@@ -992,6 +992,7 @@ constexpr const char
struct error_scope {
PyObject *type, *value, *trace;
error_scope() { PyErr_Fetch(&type, &value, &trace); }
error_scope(const error_scope &) = delete;
~error_scope() { PyErr_Restore(type, value, trace); }
};