- 14 Feb, 2021 1 commit
-
-
Ralf W. Grosse-Kunstleve committed
-
- 12 Feb, 2021 11 commits
-
-
Ralf W. Grosse-Kunstleve committed
-
Systematically replacing `detail::enable_if_t<...smart_holder...>` with `typename std::enable_if<...smart_holder...>::type`. Attempt to work around MSVC 2015 issues, to be tested via GitHub CI. The idea for this change originates from this comment: https://github.com/pybind/pybind11/issues/1616#issuecomment-444536813
Ralf W. Grosse-Kunstleve committed -
Also removing `operator T()` from smart_holder_type_caster, to fix gcc compilation errors. The only loss is pass_rref in test_class_sh_basic.
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Using @pytest.mark.parametrize to run each assert separately (to see all errors, not just the first).
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
Fixing unfortunate editing mishap. This reverts the last remaining test manipulation in commit 249df7cb and makes all existing unit tests pass with smart_holder as default holder.
Ralf W. Grosse-Kunstleve committed -
Removing `operator T&&() &&` from smart_holder_type_caster, for compatibility with the behavior of type_caster_base. Enables reverting 2 of 3 test manipulations applied under commit 249df7cb. The manipulation in test_factory_constructors.py is NOT reverted in this commit. [skip ci]
Ralf W. Grosse-Kunstleve committed -
Adding copy constructor and move constructor tracking to atyp. Preparation for a follow-up change in smart_holder_type_caster, to make this test sensitive to the changing behavior. [skip ci]
Ralf W. Grosse-Kunstleve committed
-
- 10 Feb, 2021 1 commit
-
-
This version of the code is ASAN clean with unique_ptr or smart_holder as the default. This change needs to be reverted after adopting the existing move-only-if-refcount-is-1 logic used by type_caster_base.
Ralf W. Grosse-Kunstleve committed
-
- 09 Feb, 2021 27 commits
-
-
Ralf W. Grosse-Kunstleve committed
-
Adding return_value_policy::move to permissible policies for unique_ptr returns. New stats for all tests combined: 3 failed, 467 passed.
Ralf W. Grosse-Kunstleve committed -
Changing std::shared_ptr pointer/reference to const pointer/reference. New stats for all tests combined: 4 failed, 466 passed.
Ralf W. Grosse-Kunstleve committed -
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 committed -
Adding unowned_void_ptr_from_direct_conversion to modified_type_caster_generic_load_impl. This fixes the last remaining segfault (test_numpy_dtypes). New stats for all tests combined: 12 failed, 458 passed.
Ralf W. Grosse-Kunstleve committed -
Bug fix: Adding have_value() to smart_holder_type_caster_load. With this test_builtin_casters succeeds. (All 42 tests build, 36 tests succeed, 5 run but have some failures, 1 segfault.)
Ralf W. Grosse-Kunstleve committed -
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 committed -
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 committed -
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 committed -
Softening static_assert, to only check specifically that smart_holder is not mixed with type_caster_base, and unique_ptr/shared_ptr holders are not mixed with smart_holder_type_casters.
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
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 committed -
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 committed -
Simplifying from_unique_ptr(): typename D = std::default_delete<T> is not needed. Factoring out is_std_default_delete<T>() for consistentcy between ensure_compatible_rtti_uqp_del() and from_unique_ptr().
Ralf W. Grosse-Kunstleve committed -
Factoring out struct and class definitions into anonymous namespace. Preparation for building with PYBIND11_USE_SMART_HOLDER_AS_DEFAULT.
Ralf W. Grosse-Kunstleve committed -
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 committed -
Adding enable_if !is_smart_holder_type_caster to existing initimpl::construct(). With this test_factory_constructors.cpp builds with PYBIND11_USE_SMART_HOLDER_AS_DEFAULT.
Ralf W. Grosse-Kunstleve committed -
Adding initimpl::construct() overloads, resulting in test_class_sh_factory_constructors feature parity for py::class_ and py::classh.
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
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 committed -
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 committed -
Commenting out const in def_buffer(... const). With this, test_buffers builds and runs with PYBIND11_USE_SMART_HOLDER_AS_DEFAULT. Explanation why the const needs to be removed, or fix elsewhere, is still needed, but left for later.
Ralf W. Grosse-Kunstleve committed -
Ralf W. Grosse-Kunstleve committed
-
Ralf W. Grosse-Kunstleve committed
-
With this test_class.cpp builds and even mostly runs, except `test_multiple_instances_with_same_pointer`, which segfaults because it is using a `unique_ptr` holder but `smart_holder` `type_caster`. Also adding `static_assert`s to generate build errors for such situations, but guarding with `#if 0` to first pivot to test_factory_constructors.cpp.
Ralf W. Grosse-Kunstleve committed
-