>%module foo
>template<class T1> class A{};
>template<class T2> class B{}; //unused while testing
>template<class Type> B<Type> foobar();
>
>Still there is no foobar() in foo_wrap.cxx
Well, after I rtfm ;-) I found the answer myself. Swig must instantiate the template function with the "%template" instruction to generate a wrapper. HTH some other newbie, here is the correct code:
template<class T1> class A{}; // actually this is unused, but who cares?
template<class T2> class B{};
%template(intB) B<int>; // instantiate a B<int>
template<class Type> B<Type> foobar();
%template(intfoobar) foobar<intB>; // instantiate a foobar<B<int> >
Regards
Uli
__________________________________________________________
Gesendet von Yahoo! Mail.
Dem pfiffigeren Posteingang..
http://de.overview.mail.yahoo.com-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/_______________________________________________
Swig-user mailing list
Swig-user@...
https://lists.sourceforge.net/lists/listinfo/swig-user