From: Marco C. <mar...@gm...> - 2011-10-31 15:21:12
|
I think I found a bug. Consider the following example module called mytest: %module mytest %inline %{ template<class T> struct Seq; template<class E> struct Expr { Expr() {} void method1() { } }; template<class E> struct Expr<Seq<E> > { Expr() {} void method2() { } }; %} %template(IntExpr) Expr<int>; %template(IntSeqExpr) Expr<Seq<int> >; Compiling gives: swig -o mytest_wrap.cpp -c++ -python mytest.i ok. g++ -o mytest_wrap.os -c -g3 -O0 -Wall -fPIC -I/usr/include/python2.7 mytest_wrap.cpp errors: mytest_wrap.cpp: In function ‘PyObject* _wrap_IntSeqExpr_method1(PyObject*, PyObject*)’: mytest_wrap.cpp:2896:11: error: ‘struct Expr<Seq<int> >’ has no member named ‘method1’ It seems that SWIG is not finding the proper template specialization. I'm attaching the source mytest.i. Thanks! Marco -- Marco Correia <mv...@ne...> |