mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-12 17:26:13 +00:00
[smart_holder] Make smart holder type caster of unique_ptr accept automatic_reference (#4775)
* Also accept automatic_reference * Add a test case * Remove the test case * Add another test case * Fix test case
This commit is contained in:
@@ -965,6 +965,7 @@ struct smart_holder_type_caster<std::unique_ptr<T, D>> : smart_holder_type_caste
|
||||
|
||||
static handle cast(std::unique_ptr<T, D> &&src, return_value_policy policy, handle parent) {
|
||||
if (policy != return_value_policy::automatic
|
||||
&& policy != return_value_policy::automatic_reference
|
||||
&& policy != return_value_policy::reference_internal
|
||||
&& policy != return_value_policy::move
|
||||
&& policy != return_value_policy::_clif_automatic) {
|
||||
|
||||
Reference in New Issue
Block a user