I would like to know what’s the process, when binding C++ libraries that are written with in a generic way.
Is there a posibility of binding a template class, or you can only bind only a template generated class ?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can only bind a generated class. However, it is possible to write a template function to export your class, and call this function for each concrete types you want to export. For example:
If it is not enough, you can also dive into meta programming (with Boost.MPL for example), to create typelists, and automatically call export_foo for all these types.