Be consistent in semantics of %extend on std::list::iterator

This commit is contained in:
Alan Woodland 2016-05-31 20:52:58 +01:00
commit 5eb46d5f9f

View file

@ -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<T>::iterator ret=*$self;
std::advance(ret, index);
return ret;
}
}
};
@ -156,7 +158,7 @@ namespace std {
private ListIterator<JAVA_VALUE_TYPE> init(int index) {
pos = $javaclassname.this.begin();
pos.advance_unchecked(index);
pos = pos.advance_unchecked(index);
return this;
}