Merge branch 'restore-compat-wrappers-names' into C

Merge with the latest master including PR #2371.
This commit is contained in:
Vadim Zeitlin 2022-09-17 14:36:37 +02:00
commit 864f32159a
851 changed files with 21837 additions and 7327 deletions

View file

@ -3,6 +3,8 @@
%module cpp11_alternate_function_syntax
%inline %{
struct Hello {};
struct SomeStruct {
int addNormal(int x, int y);
auto addAlternate(int x, int y) -> int;
@ -14,6 +16,9 @@ struct SomeStruct {
auto addAlternateMemberPtrConstParm(int x, int (SomeStruct::*mp)(int, int) const) const -> int;
#endif // !SWIGC
// Returning a reference didn't parse in SWIG < 4.1.0 (#231)
auto output() -> Hello&;
virtual auto addFinal(int x, int y) const noexcept -> int final { return x + y; }
virtual ~SomeStruct() = default;
};
@ -30,6 +35,7 @@ auto SomeStruct::addAlternateMemberPtrParm(int x, int (SomeStruct::*mp)(int, int
auto SomeStruct::addAlternateMemberPtrConstParm(int x, int (SomeStruct::*mp)(int, int) const) const -> int {
return 1000*x + (this->*mp)(x, x);
}
auto SomeStruct::output() -> Hello& { static Hello h; return h; }
#endif // !SWIGC
%}