summaryrefslogtreecommitdiff
path: root/Examples/test-suite/cpp11_alternate_function_syntax.i
blob: 227a1c8c870f2ac4a97f1cfa797a2e39d2fc5d75 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/* This testcase checks whether SWIG correctly uses the new alternate functions
   declarations and definitions introduced in C++11. */
%module cpp11_alternate_function_syntax

%inline %{
struct SomeStruct {
  int addNormal(int x, int y);
  auto addAlternate(int x, int y) -> int;
};
 
auto SomeStruct::addAlternate(int x, int y) -> int {
  return x + y;
}

int SomeStruct::addNormal(int x, int y) {
  return x + y;
}
%}