Fixes for compactdefaultargs and pass by value where the class being passed by value has no default constructor - previously it used SwigValueWrapper
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11312 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
421a4419f2
commit
5d3deb2db1
3 changed files with 13 additions and 1 deletions
|
|
@ -119,6 +119,7 @@
|
|||
|
||||
|
||||
// tests valuewrapper
|
||||
%feature("compactdefaultargs") MyClass2::set;
|
||||
%inline %{
|
||||
enum MyType { Val1, Val2 };
|
||||
|
||||
|
|
@ -134,6 +135,7 @@
|
|||
void set(MyClass1 cl1 = Val1) {}
|
||||
// This could have been written : set(MyClass1 cl1 = MyClass1(Val1))
|
||||
// But it works in C++ since there is a "conversion" constructor in MyClass1.
|
||||
void set2(MyClass1 cl1 = Val1) {}
|
||||
};
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue