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
24 lines
681 B
Java
24 lines
681 B
Java
|
|
import default_constructor.*;
|
|
|
|
public class default_constructor_runme {
|
|
static {
|
|
try {
|
|
System.loadLibrary("default_constructor");
|
|
} catch (UnsatisfiedLinkError e) {
|
|
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
|
|
System.exit(1);
|
|
}
|
|
}
|
|
|
|
public static void main(String argv[])
|
|
{
|
|
// calling protected destructor test
|
|
try {
|
|
G g = new G();
|
|
g.delete();
|
|
throw new RuntimeException("Protected destructor exception should have been thrown");
|
|
} catch (UnsupportedOperationException e) {
|
|
}
|
|
}
|
|
}
|