test for default args in const methods

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6625 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2004-11-02 21:26:26 +00:00
commit 6784d7e6cc
4 changed files with 36 additions and 0 deletions

View file

@ -180,6 +180,21 @@ Klass constructorcall(const Klass& k = Klass()) { return k; }
}
%}
// const methods
// runtime test needed to check that the const method is called
struct ConstMethods {
int coo(double d = 0.0) const;
};
%{
struct ConstMethods {
int coo(double d = 0.0) { return 10; }
int coo(double d = 0.0) const { return 20; }
};
%}
// Default args with C linkage
%inline
%{
extern "C" double cfunc1(double x,double p = 1) {