From e41182ac632ddfc4885d4b6a6f231fb079900155 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Thu, 7 Oct 2004 20:04:36 +0000 Subject: [PATCH] Nasty test with default args in templated methods. Also the 'using' statement for template methods that use default args. Currently broken in Python only. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6363 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Examples/test-suite/template_default_arg.i | 25 +++++++++++++++------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/Examples/test-suite/template_default_arg.i b/Examples/test-suite/template_default_arg.i index ff96b8a6d..56ac4f57b 100644 --- a/Examples/test-suite/template_default_arg.i +++ b/Examples/test-suite/template_default_arg.i @@ -1,6 +1,7 @@ %module template_default_arg %warnfilter(801) hi; /* Ruby, wrong class name */ +%warnfilter(801) Hello; /* Ruby, wrong class name */ %inline %{ template @@ -17,21 +18,29 @@ enum Hi { hi, hello }; void foo(Hi h = hi) { } - - }; - template - struct X { - X(T t = T()); - // and also: - X(double a, T t = T(0)); + template struct X { + X(T t = T()) {} + X(double a, T t = T(0)) {} + T meth(double a, T t = T(0)) { return t; } + T meth(T t = T(0)) { return t; } + }; + template class Y : private X { + public: + // test using on templated class with default args in the method + using X::meth; }; - %} %template(Hello_int) Hello; %template(X_int) X; +%template(X_longlong) X; +%template(X_unsigned) X; +%template(Y_unsigned) Y; + +%template(X_hello_unsigned) X >; +%template(Y_hello_unsigned) Y >; %inline %{