Add missing typedefs to std::vector + typedef corrections

Tests for std::vector of pointers added which check
 std::vector<T*>::const_reference and std::vector<T*>::reference
usage which gave compilation errors in Python and Perl which had
specialized these vectors incorrectly.
This commit is contained in:
William S Fulton 2019-02-13 00:04:26 +00:00
commit e26f6bb4e2
18 changed files with 182 additions and 17 deletions

View file

@ -4,12 +4,20 @@ def check(val1, val2):
if val1 != val2:
raise RuntimeError("Values are not the same %s %s" % (val1, val2))
ip1 = makeIntPtr(11)
ip2 = makeIntPtr(22)
ip2 = makeIntPtr2(22)
vi = IntPtrVector((ip1, ip2))
check(getValueFromVector(vi, 0), 11)
check(getValueFromVector(vi, 1), 22)
check(getIntValue(vi[0]), 11)
check(getIntValue(vi[1]), 22)
check(getIntValue2(vi[0]), 11)
check(getIntValue2(vi[1]), 22)
ipp = makeIntPtrPtr(vi[0])
check(getIntValue3(ipp), 11) # Note: getIntValue3 takes int**
vA = APtrVector([makeA(33), makeA(34)])
check(getVectorValueA(vA, 0), 33)