From 0a646835d260bf64adab1850440d81f4e2046445 Mon Sep 17 00:00:00 2001 From: Leif Middelschulte Date: Wed, 8 Aug 2012 16:06:37 +0000 Subject: [PATCH] Add basic C++ test for template functions. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13567 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/cpp_basic_template_function.i | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Examples/test-suite/cpp_basic_template_function.i diff --git a/Examples/test-suite/cpp_basic_template_function.i b/Examples/test-suite/cpp_basic_template_function.i new file mode 100644 index 000000000..4f289e5cb --- /dev/null +++ b/Examples/test-suite/cpp_basic_template_function.i @@ -0,0 +1,13 @@ +%module cpp_basic_template_function + +%inline +{ + template + T GetMax (T a, T b) { + T result; + result = (a>b)? a : b; + return (result); + } +} + +%template(GetMaxInt) GetMax; \ No newline at end of file