Confusion around types #893
Replies: 1 comment
-
Elementary arithmetic types can't be bound in Python. You could probably achieve something like this by representing CU64 as a C++ class with implicit conversions, which makes it effectively equivalent to an uint64_t. |
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
-
Hi,
I'm attempting to generate bindings for the first time, but I'm unsure about the capabilities of this library.
I've gone through the documentation, but I haven't been able to resolve my issue or determine whether what I'm trying to achieve is even feasible.
In my C++ library, I have the following:
My idea was to expose in my Python package a type and the function in the following way:
So, in Python CU64 is a class, while in the C++ side, it stays an alias.
However, currently, I get either some compilation errors or some std::bad_cast errors at runtime. Could you provide me a pointer if this is feasible or if I should create a class CU64?
Beta Was this translation helpful? Give feedback.
All reactions