mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-29 00:22:00 +00:00
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:
parent
ba7a0fac73
commit
45164c1fcb
@ -992,6 +992,7 @@ constexpr const char
|
|||||||
struct error_scope {
|
struct error_scope {
|
||||||
PyObject *type, *value, *trace;
|
PyObject *type, *value, *trace;
|
||||||
error_scope() { PyErr_Fetch(&type, &value, &trace); }
|
error_scope() { PyErr_Fetch(&type, &value, &trace); }
|
||||||
|
error_scope(const error_scope &) = delete;
|
||||||
~error_scope() { PyErr_Restore(type, value, trace); }
|
~error_scope() { PyErr_Restore(type, value, trace); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user