Boost logo

Boost Users :

From: e r (erwann.rogard_at_[hidden])
Date: 2008-06-09 20:06:11


Neal Becker wrote:
> Here is mine:
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users

Hi, helpful, thanks. Would be nice if accessible from the sanbox or vault.

if the distance(base_begin, base_end) is not a multiple of stride, i'm
wondering if there are any implications (if the iterator_base is not
trivial) to defining

e = make_strided_iterator(base_end,stride),

and using the usual i++<e in a loop. if there are, i'm thinking maybe
something like this?

strided_iterator<iterator_base> make_end_strided_iterator(iterator_base
b,iterator_base e,stride){
   i = b
   ee = e;
   std::size_t d = (std::distance(i,ee)-1)/stride;
   d *= stride;
   ee = i; std::advance(ee,d+1);
   return make_strided_iterator(ee,stride);
}
        


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net