fix issues with std::vector<bool> overload in STL (fixes #216)

This commit is contained in:
Wenzel Jakob
2016-05-30 11:28:21 +02:00
parent dca6b04c5f
commit 5dd33d880d
5 changed files with 19 additions and 5 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env python
from __future__ import print_function
from example import VectorInt, El, VectorEl, VectorVectorEl
from example import VectorInt, El, VectorEl, VectorVectorEl, VectorBool
v_int = VectorInt([0, 0])
print(len(v_int))
@@ -38,3 +38,11 @@ vv_a = VectorVectorEl()
vv_a.append(v_a)
vv_b = vv_a[0]
print(vv_b)
vv_c = VectorBool()
for i in range(10):
vv_c.append(i % 2 == 0)
for i in range(10):
if vv_c[i] != (i % 2 == 0):
print("Error!")
print(vv_c)