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:
parent
67364f1513
commit
4633b86c61
2 changed files with 18 additions and 0 deletions
|
|
@ -272,6 +272,7 @@ CPP_TEST_CASES += \
|
|||
template_typedef_fnc \
|
||||
template_typedef_ns \
|
||||
template_typedef_ptr \
|
||||
template_using \
|
||||
template_virtual \
|
||||
template_whitespace \
|
||||
threads \
|
||||
|
|
|
|||
17
Examples/test-suite/template_using.i
Normal file
17
Examples/test-suite/template_using.i
Normal 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>;
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue