Don't generate constructor wrappers if a base class has a private constructor
g++-5 errors out with this now with errors such as:
default_constructor_wrap.cxx:665:27: error: use of deleted function ‘FFF::FFF()’
result = (FFF *)new FFF();
^
default_constructor_wrap.cxx:314:7: note: ‘FFF::FFF()’ is implicitly deleted because the default definition would be ill-formed:
class FFF : public F {
^
default_constructor_wrap.cxx:301:4: error: ‘F::~F()’ is private
~F() { }
^
default_constructor_wrap.cxx:314:7: error: within this context
This commit is contained in:
parent
1514e19efb
commit
3718b810c7
13 changed files with 45 additions and 72 deletions
|
|
@ -5,3 +5,15 @@ See the RELEASENOTES file for a summary of changes in each release.
|
|||
Version 3.0.7 (in progress)
|
||||
===========================
|
||||
|
||||
2015-07-07: wsfulton
|
||||
SWIG no longer generates a wrapper for a class' constructor if that class has
|
||||
any base class with a private destructor. This is because your compiler should
|
||||
not allow a class to be instantiated if a base has a private destructor. Some
|
||||
compilers do, so if you need the old behaviour, use the "notabstract" feature, eg:
|
||||
|
||||
%feature("notabstract") Derived;
|
||||
class Base {
|
||||
~Base() {}
|
||||
};
|
||||
struct Derived : Base {};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue