add test case for template+typedef+typemaps

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6526 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-10-27 00:40:03 +00:00
commit 0b2cb3849f

View file

@ -0,0 +1,42 @@
%module template_typemap
%typemap(in) Integer
{
/* do nothing */
}
%typemap(out) Integer
{
/* do nothing */
}
%{
typedef int Integer;
%}
%inline %{
template <class T>
struct Foo
{
T val;
T get_val() const
{
return val;
}
void set_val(T v)
{
val = v;
}
};
%}
%template(Foo_i) Foo<int>;
%template(Foo_I) Foo<Integer>;