diff options
Diffstat (limited to 'Examples/test-suite/overload_template.i')
-rw-r--r-- | Examples/test-suite/overload_template.i | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Examples/test-suite/overload_template.i b/Examples/test-suite/overload_template.i new file mode 100644 index 000000000..01a1dd633 --- /dev/null +++ b/Examples/test-suite/overload_template.i @@ -0,0 +1,19 @@ +%module overload_template +%inline %{ + +int foo() { + return 3; +} +template <class T> + int foo(int x) { + return x; + } + +template<class T> + T max(T a, T b) { return (a > b) ? a : b; } +%} + + +%template(max) max<int>; +%template(max) max<double>; + |