Adding virtual_overrider_self_life_support. (#2902)

* Initial version of virtual_overrider_self_life_support (enables safely passing unique_ptr to C++).

* Clang 3.6, 3.7 compatibility.

* Adding missing default constructor.

* Restoring test for exception for the case that virtual_overrider_self_life_support is not used.

* Fixing oversight: Adding missing holder().ensure_was_not_disowned().

* Adding unit tests for new `struct smart_holder` member functions.

* Moving virtual_overrider_self_life_support to separate include file, with iwyu cleanup.
This commit is contained in:
Ralf W. Grosse-Kunstleve
2021-03-16 06:31:24 -07:00
committed by GitHub
parent d6cf6dfed3
commit 469792032a
8 changed files with 225 additions and 58 deletions

View File

@@ -48,6 +48,7 @@ detail_headers = {
"include/pybind11/detail/smart_holder_type_casters.h",
"include/pybind11/detail/type_caster_base.h",
"include/pybind11/detail/typeid.h",
"include/pybind11/detail/virtual_overrider_self_life_support.h",
}
cmake_files = {