diff --git a/Lib/java/std_list.i b/Lib/java/std_list.i index dbce830c2..330bff854 100644 --- a/Lib/java/std_list.i +++ b/Lib/java/std_list.i @@ -72,8 +72,10 @@ namespace std { return **$self; } - void advance_unchecked(jint index) { - std::advance(*$self, index); + iterator advance_unchecked(jint index) const { + std::list::iterator ret=*$self; + std::advance(ret, index); + return ret; } } }; @@ -156,7 +158,7 @@ namespace std { private ListIterator init(int index) { pos = $javaclassname.this.begin(); - pos.advance_unchecked(index); + pos = pos.advance_unchecked(index); return this; }