Tolc-Software/tolc

will it work for templates

matrixbot123 opened this issue · 1 comments

I am working on making python wwrapper for a large cpp library ( which is full of templates )

Sure, you just need to forward declare the function types you want to use from python. There is currently no way to duck-type from the python side to the C++ side. Simply because templated functions are generated at compile time. See the documentation for examples:

Look under Templates
https://docs.tolc.io/python/examples/

For how the naming convention works on the python side.
https://docs.tolc.io/python/template_naming_convention/

I would add another file with all the forward declarations you need. Does that answer your question?