New Sequence Points in C++11
With the new college year upon us.
We have started to receive the standard why does ++ i ++ not work as
expected questions.
After just answering one of these type of questions I was told that the
new C++11 standard has changed and this is no longer undefined behavior. I
have heard that sequence points have been replaced by sequenced before and
sequenced after but have not read deep (or at all) into the subject.
So the question I was just answering had:
k = ++ (++ i);
So the question is:
How has the sequence points changes in C++11 and how does it affect
questions like the above. Is it still undefined behavior or is this now
well defined?
No comments:
Post a Comment