Could I find this kind of iterator from boost?

example
1
2
3
4
std::vector<size_t> data(10);
std::iota(data.begin(), data.end(), 0);//assign value to data from 0~9
iteratorIneed it(data, data.begin(), 2), it_end(data, data.end());
for_each(it,it_end,"some functor")


The "iteratorIneed it" would point to the beginning of the data
And it would increment the address of 2 times than normal iterator
Could I find something like this from boost?
If I could, which library should I look into?
Thank you very much
Not really. The only candidate library would be boost.iterator, but what you are asking for is a little too specialized to be in a generic library.

It should be fairly easy to create your own iterator class that does a double increment in its operator++ members.
Thanks, I need this kind of iterator because the memory geometry of
the multi channel Matrix of openCV2.2 is a little incovenience for generic algorithm
Last edited on
Topic archived. No new replies allowed.