-
Notifications
You must be signed in to change notification settings - Fork 1
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
pybind11 doesn't allow same name nested class defined in different scope #310
Comments
We can avoid this by specifying the name in the configuration YAML, but it would be great to provide options to automatically handle this issue. Possible options:
Additionally, we may want to detect the name confliction to catch this error before generating bindings and either not generating the binding or renaming it to a unique name like appending characters (e.g., multiple underscores or numbers). |
@psigen Would you have some suggestions on this? This is another name conflict issue that might need the scope-changing method or/and name mangling method. |
Just in case if this is a pybind11 issue: pybind/pybind11#2187 |
Given the following code, pybind11 generates binding code correctly and builds with no errors.
However, module loading fails saying:
Boost.Python works fine.
Additional findings:
Base
andDerived
is in different namespace.Option
is at the same level. For example, this issue disappear in the following case:The text was updated successfully, but these errors were encountered: