Flicking through the O'Reilly C++ Quick Reference I saw a snippet of code that I didn't understand at all because I've never seen anything like it before:

Code:
for SpectrumColor operator++(SpectrumColor &s, int dummy)
{
    return s = (s >= Violet) ? Red : SpectrumColor(s + 1);
}
SpectrumColor is an enumeration as you've probably guessed. I just don't understand this form of the for loop because I've never seen it.