Add missing typecheck typemaps for std::auto_ptr and std::unique_ptr
To fix overloading when using these types.
This commit is contained in:
parent
f0af17b324
commit
e97181ebc0
59 changed files with 442 additions and 2 deletions
|
|
@ -111,6 +111,15 @@ public class cpp11_std_unique_ptr_runme {
|
|||
cpp11_std_unique_ptr.takeKlassUniquePtr(cpp11_std_unique_ptr.make_null());
|
||||
checkCount(0);
|
||||
|
||||
// overloaded parameters
|
||||
if (cpp11_std_unique_ptr.overloadTest() != 0)
|
||||
throw new RuntimeException("overloadTest failed");
|
||||
if (cpp11_std_unique_ptr.overloadTest(null) != 1)
|
||||
throw new RuntimeException("overloadTest failed");
|
||||
if (cpp11_std_unique_ptr.overloadTest(new Klass("over")) != 1)
|
||||
throw new RuntimeException("overloadTest failed");
|
||||
checkCount(0);
|
||||
|
||||
|
||||
// unique_ptr as output
|
||||
Klass k1 = cpp11_std_unique_ptr.makeKlassUniquePtr("first");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue