test using declaration for methods with an exception specification
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7214 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
4ada2f88af
commit
4453747c6b
2 changed files with 40 additions and 0 deletions
|
|
@ -6,12 +6,20 @@
|
|||
int x;
|
||||
virtual ~Foo() { }
|
||||
virtual Foo* blah() { return this; }
|
||||
virtual Foo* exception_spec(int what_to_throw) throw (int, const char *) {
|
||||
int num = 10;
|
||||
const char *str = "exception message";
|
||||
if (what_to_throw == 1) throw num;
|
||||
else if (what_to_throw == 2) throw str;
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
class FooBar : public Foo {
|
||||
public:
|
||||
using Foo::blah;
|
||||
using Foo::x;
|
||||
using Foo::exception_spec;
|
||||
};
|
||||
|
||||
%}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue