summaryrefslogtreecommitdiff
path: root/Examples/test-suite/using_pointers.i
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/test-suite/using_pointers.i')
-rw-r--r--Examples/test-suite/using_pointers.i8
1 files changed, 4 insertions, 4 deletions
diff --git a/Examples/test-suite/using_pointers.i b/Examples/test-suite/using_pointers.i
index b2d6abe4d..1a3824afa 100644
--- a/Examples/test-suite/using_pointers.i
+++ b/Examples/test-suite/using_pointers.i
@@ -4,10 +4,10 @@
%csmethodmodifiers x "public new"
#endif
+// throw is invalid in C++17 and later, only SWIG to use it
+#define TESTCASE_THROW2(T1, T2) throw(T1, T2)
%{
-#if defined(_MSC_VER)
- #pragma warning(disable: 4290) // C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
-#endif
+#define TESTCASE_THROW2(T1, T2)
%}
%inline %{
@@ -16,7 +16,7 @@
int x;
virtual ~Foo() { }
virtual Foo* blah() { return this; }
- virtual Foo* exception_spec(int what_to_throw) throw (int, const char *) {
+ virtual Foo* exception_spec(int what_to_throw) TESTCASE_THROW2(int, const char *) {
int num = 10;
const char *str = "exception message";
if (what_to_throw == 1) throw num;