I almost pulled all of my hair. The code speaks for itself:
const float* const vertices = ...;
unsigned int j = 0;
pair<float, float> poor;
poor.first = vertices[j];
poor.second = vertices[j + 1];
CCLOG("WIT0 %f,%f", poor.first, poor.second);
poor.first = vertices[j++];
poor.second = vertices[j++];
CCLOG("WIT1 %f,%f", poor.first, poor.second);
j -= 2;
poor = pair<float, float>(vertices[j], vertices[j + 1]);
CCLOG("WIT2 %f,%f", poor.first, poor.second);
poor = pair<float, float>(vertices[j++], vertices[j++]);
CCLOG("WIT3 %f,%f", poor.first, poor.second);
The result is:
WIT0 -38.063835,32.743618
WIT1 -38.063835,32.743618
WIT2 -38.063835,32.743618
WIT3 32.743618,-38.063835 <- What about that, eh?
I always, always thought code is evaluated from left to right. Seems this isn't the case here. Code run on Visual Studio 2015, Win32 Debug mode.
Can someone tell me if this is implementation specific and not addressed yet by the C++ guide?