Beispiel #1
0
 void advance(difference_type n) {
     pos += n;
     if (n > 0) {
         while (part < vec->nparts() && pos >= vec->part[part + 1])
             ++part;
     } else if (n < 0) {
         while (part > 0 && pos < vec->part[part])
             --part;
     }
 }
Beispiel #2
0
 void increment() {
     ++pos;
     while (part < vec->nparts() && pos >= vec->part[part + 1])
         ++part;
 }