add template+using test

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7287 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-06-13 16:41:27 +00:00
commit 4633b86c61
2 changed files with 18 additions and 0 deletions

View file

@ -272,6 +272,7 @@ CPP_TEST_CASES += \
template_typedef_fnc \
template_typedef_ns \
template_typedef_ptr \
template_using \
template_virtual \
template_whitespace \
threads \

View file

@ -0,0 +1,17 @@
%module template_using
%inline
{
namespace foo {
template<typename T> class Foo { };
template<typename T> T maxk(T a, T b) { return a > b ? a : b; }
}
using foo::maxk;
}
%template(maxint) foo::maxk<int>;
%template(Foofloat) foo::Foo<float>;
%template(maxfloat) maxk<float>;