I find that the only valid way to visit every item in a ring-list is to use both an if-statement and a do-while loop. i.e.You most certainly cannot use a for_each as I'm sure everybody is aware of already.Code:
typedef circular_iterator<std::list<int>::iterator> cilit;
cilit start = circular_begin(lst), it = start;
cout << *it << endl;
} while (++it != start);
Now, as you can guess, I've definitely written one of these before!