Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#1321 swig think a class is virtual if a member function does not have the same default argument as the same function in the virtual parent class

open
nobody
None
5
2013-04-23
2013-04-23
jonathan
No

swig think a class is virtual if a member function does not have the same default argument as the same function in the virtual parent class

using the very simple following swig file (c++, python) no constructor is generated for the class "b" because swig thinks that b is virtual while it's not :

%module "inherit"

class a {
public :
void test(void *p = NULL) = 0;
};

class b : public a {
public:
void test(void *p) {};
b() {}
};

If I change void test(void ) to void test(void p = NULL), it works.

I'm using swig 2.0.9 on archlinux

Discussion