Change in default behaviour wrapping C++ bool for Python.
Only a Python True or False will now work for C++ bool parameters. This fixes overloading bool with other types.
This commit is contained in:
parent
7f45cbd178
commit
504c2030bb
11 changed files with 251 additions and 11 deletions
|
|
@ -17,10 +17,10 @@ halve_in_place(dv)
|
|||
|
||||
|
||||
bv = BoolVector(4)
|
||||
bv[0]= 1
|
||||
bv[1]= 0
|
||||
bv[2]= 4
|
||||
bv[3]= 0
|
||||
bv[0]= bool(1)
|
||||
bv[1]= bool(0)
|
||||
bv[2]= bool(4)
|
||||
bv[3]= bool(0)
|
||||
|
||||
if bv[0] != bv[2]:
|
||||
raise RuntimeError,"bad std::vector<bool> mapping"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue