virtual copying
#3487
Replies: 1 comment 4 replies
-
Ah, nuts 🤦 I believe I have a fix for this on our fork, been meaning to PR it: Lemme see if I can PR this in next few min. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am trying to write bindings for a bunch of classes, that implement a common interface
A
. Now this interface declares a functionstd::unique_ptr<A> copy() const
which is supposed to create a copy of the current object. Following the documentation on trampoline classes etc., I came up with this code:however, this doesn't compile. Instead I get the following error message, which I am having trouble to understand:
The bit I am understanding is, that pybind seems to be having some trouble casting some handle to
std::unique_ptr<A>
, doesn't it? What do I need to do to make this work? Any help is much appreciated :)Beta Was this translation helpful? Give feedback.
All reactions