Ralf W. Grosse-Kunstleve
45ec61f419
Adding shared_ptr_reset_and_rescue_pointee_model_proof_of_concept.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
b633bb5b84
Inserting #ifdef
to preempt Windows fatal exception.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
e0b770d549
Explictly discarding [[nodiscard]] to avoid MSVC CI failures.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
4f00ffdc69
Copying in shared_from_this_custom_deleters.cpp from github.com/rwgk, with adjustments.
...
Base version: e5318faa6a/shared_from_this_custom_deleters.cpp
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
28ed5ecce8
Revert "Experiment: commenting out test_class_sh_shared_from_this."
...
This reverts commit febf9ce949c0bc87a8bf7ab3ddae4deb28636c9d.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
eae174b491
Revert "Experiment: effectively undoing all shared_from_this modifications."
...
This reverts commit d72d54ebb0b7784f5616edc02910dbd9cce0b2a4.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
a6abb7cff1
Revert "Experiment: undoing even more."
...
This reverts commit 59bc2e183e7aef5e45c06aed6965de0ac52d7b06.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
5f92b4ff1c
Revert "Experiment: restoring original smart_holder_type_casters.h from smart_holder branch."
...
This reverts commit 19c5a3613fee71878ba2af0339eed325a5916089.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
2ae3c2ceb7
Experiment: restoring original smart_holder_type_casters.h from smart_holder branch.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
9da1e81590
Experiment: undoing even more.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
715ceb4bf3
Experiment: effectively undoing all shared_from_this modifications.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
6989f174ac
Experiment: commenting out test_class_sh_shared_from_this.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
05bd93543b
Fully emulating type_caster_base-related behavior: trying shared_from_this also for unowned pointees.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
e1de4e88b8
Adding test_class_sh_shared_from_this.cpp to tests/CMakeLists.txt.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
775873d0b6
Adding from_raw_pointer_take_ownership_or_shared_from_this().
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
2a265860a7
enable_shared_from_this_from_raw_ptr_take_ownership_guard: better static_assert that also triggers for derived classes.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
24c223ad8e
static_assert in from_raw_ptr_take_ownership, to be tested.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
7a74bfede7
Restoring init_holder overload for std::enable_shared_from_this and original tests/test_smart_ptr.py.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
e5b38a4459
Breaking up test_shared_ptr_from_this_and_references into smaller subtests. Skipping the only test that generates an ASAN heap-use-after-free.
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
94523e8a02
Experiments: 1. disabling enable_shared_from_this, 2. using smart_holder in test_class_sh_shared_from_this.cpp
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
252b6aefb8
Isolating shared_from_this tests from test_smart_ptr (minimal changes).
2021-06-30 07:04:31 -07:00
Ralf W. Grosse-Kunstleve
bcad852f6b
Pure clang-format fixes (minor accident in PR #3039 ).
2021-06-29 16:16:00 -07:00
Jakob Lykke Andersen
b9241c0330
SM, remove type annotations in test
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
f39efb850b
SH, attribute and property tests
2021-06-29 05:57:32 -07:00
Ralf W. Grosse-Kunstleve
fa5ffc3d02
Automatic clang-format.
2021-06-29 05:57:32 -07:00
Ralf W. Grosse-Kunstleve
a428f5755d
Automatic clang-tidy fixes.
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
f06f0927b3
SH, history tracking
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
0337ed944d
SH, fix use of PYBIND11_TYPE_CASTER_BASE_HOLDER
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
ee53a45ffd
SH, fix typo
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
b735093fde
SH, shared_ptr copy/move, rename to 'history'
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
ef6907c1ae
SH, shared_ptr copy/move, make MSVC happy
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
abf11b9d9a
SH, shared_ptr copy/move, update after review
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
7312e624b2
SH, improve error message from shared_ptr cast policy check
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
be60fc52a4
Allow move policy in smart holder caster for shared_ptr
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
660f83e81d
SH, test for shared_ptr move
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
c807807c55
Allow copy policy in smart holder caster for shared_ptr
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
2934913761
SH, test update
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
fc548c067f
SH, update shared_ptr copy tests
2021-06-29 05:57:32 -07:00
Jakob Lykke Andersen
1f98d74761
Initial test
2021-06-29 05:57:32 -07:00
Ralf W. Grosse-Kunstleve
68b6f8c612
Tracking change in type_caster_base.h on master (PR #3059 ).
2021-06-25 21:57:45 -07:00
Cris Luengo
57a36633c4
fix: enable py::implicitly_convertible<py::none, ...> for py::class_-wrapped types ( #3059 )
...
* Allow casting from None to a custom object, closes #2778
* ci.yml patch from the smart_holder branch for full CI coverage.
2021-06-25 21:57:45 -07:00
Cris Luengo
93e69191c1
fix: enable py::implicitly_convertible<py::none, ...> for py::class_-wrapped types ( #3059 )
...
* Allow casting from None to a custom object, closes #2778
* ci.yml patch from the smart_holder branch for full CI coverage.
2021-06-25 17:56:17 -07:00
Ralf W. Grosse-Kunstleve
cfc06838fd
Temporarily using DOWNLOAD_CATCH=OFF for all Windows builds.
...
This also disables catch for some other builds that happen to be in the same
matrix. But there are still plenty of builds running with DOWNLOAD_CATCH=ON.
Workaround for a windows-only download issue that started yesterday (2020-06-23):
-- Downloading catch v2.13.2...
CMake Error at tools/FindCatch.cmake:40 (message):
Could not download
https://github.com/philsquared/Catch/releases/download/v2.13.2/catch.hpp
Call Stack (most recent call first):
tools/FindCatch.cmake:59 (_download_catch)
tests/pure_cpp/CMakeLists.txt:1 (find_package)
2021-06-24 12:02:42 -07:00
Ralf W. Grosse-Kunstleve
854a95b47d
Merge branch 'master' into smart_holder
2021-06-22 15:16:14 -07:00
Ralf W. Grosse-Kunstleve
484b0f0433
Updating and slightly enhancing instructions for running clang-tidy. ( #3055 )
...
* Updating and slightly enhancing instructions for running clang-tidy.
* Making documented commands identical to workflow commands. Adding comment in workflow file pointing to documentation.
2021-06-22 15:12:58 -07:00
Ralf W. Grosse-Kunstleve
2c828ff552
More clang-tidy fixes. These escaped before because -DDOWNLOAD_EIGEN=ON -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=17
, as used in the GitHub Actions, were missing in the interactive run.
2021-06-22 14:42:47 -07:00
Ralf W. Grosse-Kunstleve
2eeac0c369
Applying clang-tidy fixes needed after merging PR #3051 (mostly automatically).
2021-06-22 13:38:30 -07:00
Ralf W. Grosse-Kunstleve
898d5b301c
Manually fixing merge conflict.
2021-06-22 12:19:40 -07:00
Aaron Gokaslan
dac74ebdf5
fix(clang-tidy): performance fixes applied in tests and CI ( #3051 )
...
* Initial fixes
* Whoops
* Finish clang-tidy manual fixes
* Add two missing fixes
* Revert
* Update clang-tidy
* Try to fix unreachable code error
* Move nolint comment
* Apply missing fix
* Don't override clang-tidy config
* Does this fix clang-tidy?
* Make all clang-tidy errors visible
* Add comments about NOLINTs and remove a few
* Fix typo
2021-06-22 12:11:54 -04:00
Ralf W. Grosse-Kunstleve
8d1e0b3903
[smart_holder] clang-tidy fixes (related to recent clang-tidy changes on master). ( #3053 )
...
* clang-tidy fixes (related to recent clang-tidy changes on master).
* More clang-tidy fixes.
2021-06-21 12:40:10 -07:00