-
Notifications
You must be signed in to change notification settings - Fork 2.2k
[smart_holder]: trampoline_self_life_support -fvisibility question #3927
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
Comments
Note, if I don't derive from |
Ping @rwgk |
Only if there is actually a lifetime issue (with pybind11 master), but not in general. It looks like your case is in the "general" domain.
This seems to be related: With a lot of guessing, Spontaneous best guesses:
Your milage may vary. Or do you think we need to |
Seeing that it works without deriving from |
I'm curious, why would we not export this symbol? Seems like it should be exported since it's intended to be used by other libraries. |
Did you see this already? Takeaway:
|
I'm not sure to be honest, especially because we (Google) internally use "default" visibility, i.e. everything is exported. I am thinking/guessing for the "external" world that does many things differently, keeping the symbol hidden is better, for situations in which extensions are built with different pybind11 versions, compilers, or options, or all of it. |
Unrelated to this issue, I recently got to understand more about My thinking now:
|
Required prerequisites
Problem description
I'm attempting to use the
Progressive
mode to solve a lifetime issue with a trampoline class via the following steps:-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT
to compilation commandsstd::shared_ptr<...>
holder withPYBIND11_SH_DEF(Foo)
public py::trampoline_self_life_support
When I compile, I get this warning:
Reproducible example code
The text was updated successfully, but these errors were encountered: