how to convert a large number struct and their conversion methods into Python class? #4655
Unanswered
YunchengLiu
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Here is a C++14 version of compile-time dimensional analysis library that I use well in C++ projects to constrain a constant value to have a specific physical unit. Now I want to export the C++ project as a Python project. The first question is how to export the content of this library, which has quite a lot of template functions and structures, as Python content? It can be evaluated at runtime in Python, but I hope that some of the features of these structures, such as implicit type conversion and error reporting for mismatched units, can be included in Python.
Any good practice ideas? I've been struggling with this for a long time, I'm new to pybind11.
Do I need to reimplement some structures suitable for Python and convert them?
Beta Was this translation helpful? Give feedback.
All reactions