fix template_deftype to work with functions

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6904 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-12-20 21:23:10 +00:00
commit 456649a242

View file

@ -162,3 +162,26 @@ namespace ns1 {
}
%}
%inline %{
namespace hi
{
class CFoo
{
};
template<class T1, class T2 = T1> class CTemplate
{
};
typedef CTemplate<CFoo> TBla; // OK
typedef void (*TFunc1)(CFoo arg); // OK
typedef void (*TFunc2)(CTemplate<CFoo> arg); // crashes SWIG
typedef void (*TFunc3)(CTemplate<CFoo>* arg); // crashes SWIG
int foo(TFunc1 a, TFunc2 b, TFunc3 c);
}
%}