summaryrefslogtreecommitdiff
path: root/Examples/test-suite/extern_throws.i
blob: 92ece4158b45820178a8e933999bdc1e661bc0af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
%module extern_throws 

// throw is invalid in C++17 and later, only SWIG to use it
#define TESTCASE_THROW1(T1) throw(T1)
%{
#define TESTCASE_THROW1(T1)
%}

%inline %{
#include <exception>
extern int get() TESTCASE_THROW1(std::exception);

%}

%{
int get() TESTCASE_THROW1(std::exception) { return 0; }
%}