I have a class in C++ which is a template class, and one method on this class is templated on another placeholder
template <class T>
class Whatever {
public:
template <class V>
void foo(std::vector<V> values);
}
When I transport this class to the swig file, I did
%template(Whatever_MyT) Whatever<MyT>;
Unfortunately, when I try to invoke foo
on an instance of Whatever_MyT from python, I get an attribute error. I thought I had to instantiate the member function with
%template(foo_double) Whatever<MyT>::foo<double>;
which is what I would write in C++, but it does not work (I get a syntax error)
Where is the problem?