From: <le...@us...> - 2012-08-08 16:06:46
|
Revision: 13567 http://swig.svn.sourceforge.net/swig/?rev=13567&view=rev Author: leiflm Date: 2012-08-08 16:06:37 +0000 (Wed, 08 Aug 2012) Log Message: ----------- Add basic C++ test for template functions. Added Paths: ----------- branches/gsoc2012-c/Examples/test-suite/cpp_basic_template_function.i Added: branches/gsoc2012-c/Examples/test-suite/cpp_basic_template_function.i =================================================================== --- branches/gsoc2012-c/Examples/test-suite/cpp_basic_template_function.i (rev 0) +++ branches/gsoc2012-c/Examples/test-suite/cpp_basic_template_function.i 2012-08-08 16:06:37 UTC (rev 13567) @@ -0,0 +1,13 @@ +%module cpp_basic_template_function + +%inline +{ + template <class T> + T GetMax (T a, T b) { + T result; + result = (a>b)? a : b; + return (result); + } +} + +%template(GetMaxInt) GetMax<int>; \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |