Boost logo

Boost Users :

Subject: [Boost-users] Iterator to wrap around ends of the container. Does it exist?
From: PB (newbarker_at_[hidden])
Date: 2009-07-22 05:45:15


Hi,

Just wondered if there was anything in Boost so that when an iterator
is incremented, if it's at the last element it goes to the begin() of
the container. And for decrement if at the beginning it would refer to
one before end(). The sequence would have to be finite, so just
selecting a different logical begin and end really.

I'm looking to solve this using some kind of new iterator (iterator
adaptor) rather than a change of container.

If there anything in Boost for this?

Thanks,

Pete


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