Replies: 1 comment
-
Oh, bummer: #include<nanobind/stl/shared_ptr.h> fixed the issue. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
In the following code,
func_shared
is acceptingshared_ptr<Base>
and fails when passed an instance ofDerived
(both are wrapped with nanobind), the error being:Passing
Derived
instance tofunc(Base&)
works as expected.Am I overlooking something obvious? I found this discussion of something similar, but it was solved by properly declaring base classes in
nb::class_
, which I already do.The MWE is here:
Python code:
Beta Was this translation helpful? Give feedback.
All reactions