Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make type caster of std::unique_ptr accept return_value_policy::automatic_reference #30058

Closed

Conversation

wangxf123456
Copy link
Contributor

Description

Pybind11 always override return_value_policy::automatic and return_value_policy::automatic_reference with return_value_policy::move for std::unique_ptr: https://github.com/google/pywrapcc/blob/8bcd157442a1e02bb0bc06515e938bbb5f487564/include/pybind11/cast.h#L1277, so return_value_policy::automatic and return_value_policy::automatic_reference does not make any difference for std::unique_ptr. We should make the type caster accept both.

@wangxf123456
Copy link
Contributor Author

Merge to smart_holder branch instead

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant