I have a template function with following signature in c++ file
template <class T> std::vector<T> function(T);
I wanna make an interface file to wrap main.cpp to a python file with Swig. How should I include Tfunction in Swig, for types int float and double?
//main.i
%module main
%include "carrays.i"
%array_class(double, doubleArray);
%{
extern template <class T> std::vector<T> Tfunction(T);
%}
extern template <class T> std::vector<T> Tfunction(T);