Boost logo

Boost :

From: Craig Hicks (hicks_at_[hidden])
Date: 2001-02-27 22:32:04


If you are really iterating over and over a fixed size container, and speed
is important, you probably want to set up a
vector of copies, or a vector of pointers at the start to cut down access
time.

Then you can use vec[n % isize] to get what you want.
But this has little to do with STL, I realize.

Craig Hicks

----- Original Message -----
From: <narad_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Wednesday, February 28, 2001 12:57 AM
Subject: [boost] Cyclic iterators

> Hi,
>
> I would like to iterate over a container again and again (a vector,
> list or set). I would like to simply increment the iterator all the
> time, without having to check if I reached the end().
>
> Any ideas on implementing this? Anyone done that before?
>
> Thanks,
> Nir Arad.
>
>
>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk