I managed to bind template definitions doing
py::class_<T<a>>(m, "Ta")
py::class_<T<b>>(m, "Tb")
...
where T is the template class and a and b typenames defining the template. But the problem I have tells me that this is not the really good way to expose these template definitions, because now I am forced to duplicate code for all the functions and parameters of the template class T:
py::class_<T<a>>(m, "Ta")
.def(py::init<string, string>())
.def("do_smthg", &T<a>::do_sthg)
...;
py::class_<T<b>>(m, "Tb")
.def(py::init<string, string>())
.def("do_smthg", &T<b>::do_sthg)
...;
when class T itself for instance has do_smthg, that I would then expect to have to define only once. I tried to browse the doc and the web, but I failed to find the right pointer.