Fix std::vector of pointers which failed if a pointer to a pointer of the container element type existed (Python)

Closes SF Bug 2359417 created after commit 93f0390322 (svn rev 10958)
This commit is contained in:
William S Fulton 2016-07-27 19:49:38 +01:00
commit 6e9184b6f8
5 changed files with 120 additions and 9 deletions

View file

@ -1,12 +1,19 @@
package main
import . "./li_std_vector_ptr"
import "fmt"
func check(val1 int, val2 int) {
if val1 != val2 {
panic(fmt.Sprintf("Values are not the same %d %d", val1, val2))
}
}
func main() {
ip1 := MakeIntPtr(11)
ip2 := MakeIntPtr(22)
vi := NewIntPtrVector()
vi.Add(ip1)
vi.Add(ip2)
DisplayVector(vi)
check(GetValueFromVector(vi, 0), 11)
check(GetValueFromVector(vi, 1), 22)
}