Add std::unique support
Simple copy of current auto_ptr support (just suppport for functions returning std::unique_ptr). Closes #1722
This commit is contained in:
parent
1993b334a6
commit
299880e6a6
14 changed files with 443 additions and 15 deletions
17
Examples/test-suite/python/cpp11_std_unique_ptr_runme.py
Normal file
17
Examples/test-suite/python/cpp11_std_unique_ptr_runme.py
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
from cpp11_std_unique_ptr import *
|
||||
|
||||
k1 = makeKlassUniquePtr("first")
|
||||
k2 = makeKlassUniquePtr("second")
|
||||
if Klass.getTotal_count() != 2:
|
||||
raise "number of objects should be 2"
|
||||
|
||||
del k1
|
||||
if Klass.getTotal_count() != 1:
|
||||
raise "number of objects should be 1"
|
||||
|
||||
if k2.getLabel() != "second":
|
||||
raise "wrong object label"
|
||||
|
||||
del k2
|
||||
if Klass.getTotal_count() != 0:
|
||||
raise "no objects should be left"
|
||||
Loading…
Add table
Add a link
Reference in a new issue