- 09 Feb, 2021 40 commits
-
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
Changing std::shared_ptr pointer/reference to const pointer/reference. New stats for all tests combined: 4 failed, 466 passed.
-
Ralf W. Grosse-Kunstleve authored
Adding "Lazy allocation for unallocated values" (for old-style __init__) into load_value_and_holder. Deferring destruction of disowned holder until clear_instance, to remain inspectable for "uninitialized" or "disowned" detection. New stats for all tests combined: 5 failed, 465 passed.
-
Ralf W. Grosse-Kunstleve authored
Introducing check_is_smart_holder_type_caster() function for runtime check, and reinterpreting record.default_holder as "uses_unique_ptr_holder". With this test_smart_ptr succeeds. (All 42 tests build, 35 tests succeed, 5 run but have some failures, 2 segfault.)
-
Ralf W. Grosse-Kunstleve authored
Adding remaining PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS. static_assert for "necessary conditions" for both types of default holder, static_assert for "strict conditions" guarded by new PYBIND11_STRICT_ASSERTS_CLASS_HOLDER_VS_TYPE_CASTER_MIX. All tests build & run as before with unique_ptr as the default holder, all tests build for smart_holder as the default holder, even with the strict static_assert.
-
Ralf W. Grosse-Kunstleve authored
Adding PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS in test_class.cpp (with this all but one test succeed with PYBIND11_USE_SMART_HOLDER_AS_DEFAULT).
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
Introducing 1. type_caster_for_class_, used in PYBIND11_MAKE_OPAQUE, and 2. default_holder_type, used in stl_bind.h.
-
Ralf W. Grosse-Kunstleve authored
Introducing PYBIND11_SMART_POINTER_HOLDER_TYPE_CASTERS. Using it in test_smart_ptr.cpp. With this test_smart_ptr builds with PYBIND11_USE_SMART_HOLDER_AS_DEFAULT and all but one test run successfully.
-
Ralf W. Grosse-Kunstleve authored
Factoring out struct and class definitions into anonymous namespace. Preparation for building with PYBIND11_USE_SMART_HOLDER_AS_DEFAULT.
-
Ralf W. Grosse-Kunstleve authored
Disabling shared_ptr&, shared_ptr* tests when building with PYBIND11_USE_SMART_HOLDER_AS_DEFAULT for now, pending work on smart_holder_type_caster<shared_ptr>.
-
Ralf W. Grosse-Kunstleve authored
Adding initimpl::construct() overloads, resulting in test_class_sh_factory_constructors feature parity for py::class_ and py::classh.
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
Removing include/pybind11/detail/smart_holder_type_casters.h from CMakeLists.txt, test_files.py (since it does not exist in this branch).
-
Ralf W. Grosse-Kunstleve authored
Adding test_class_sh_factory_constructors, reproducing test_factory_constructors failure. Using py::class_ in this commit, to be changed to py::classh for debugging.
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
Introducing PYBIND11_USE_SMART_HOLDER_AS_DEFAULT macro (tested only undefined; there are many errors with the macro defined).
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
Unification of unique_ptr, unique_ptr_with_deleter code in smart_holder_poc.h. Leads to more fitting error messages. Enables use of unique_ptr<T, D> smart_holder_type_casters also for unique_ptr<T>.
-
Ralf W. Grosse-Kunstleve authored
Adding smart_holder_type_casters for unique_ptr with custom deleter. SEVERE CODE DUPLICATION. This commit is to establish a baseline for consolidating the unique_ptr code.
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
Moving get_local_load_function_ptr, init_instance_for_type to smart_holder_type_caster_class_hooks. Expanding static_assert in py::type::handle_of<> to accommodate smart_holder_type_casters.
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
The user-facing macro is now PYBIND11_SMART_HOLDER_TYPE_CASTERS.
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
-
Ralf W. Grosse-Kunstleve authored
https://github.com/rwgk/rwgk_tbx/commit/a2c2f88174a30f5de80d7d26e0f77c7b60f5fb85 These tests are from experimenting, and for demonstrating UB in pybind11 multiple inheritance handling ("first_base"), to be fixed later.
-