swig/Examples/test-suite/cpp0x_alternate_function_syntax.i
2010-06-26 22:48:49 +00:00

18 lines
421 B
OpenEdge ABL

/* This testcase checks whether SWIG correctly uses the new alternate functions
declarations and definitions introduced in C++0x. */
%module cpp0x_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;
}
%}