I’m wondering if there’s some sort of iterator that can iterate over values in a std::string, starting over from the beginning when it reaches the end. In other words, this object would iterate indefinitely, spitting out the same sequence of values over and over again.
Thanks!
A generator function could be that. Boost Iterator has the iterator adaptor for that:
A sample: http://coliru.stacked-crooked.com/a/267279405be9289d