Consider this program fragment:
std::vector v = { 0, 0 };
int i = 0;
v[i++] = i++;
std::cout << v[0] << v[1] << endl;
My question is not what it might print under today’s C++ rules. The third line runs afoul of two different categories of undefined and unspecified behavior.
Rather, my question is what you would like the result to be. Please let me know.
Take Our PollFiled under:
Uncategorized
Published on December 01, 2014 12:46