Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

is "Side effects of a function are sequenced before its evaluation" specified by the C++ standard?

$
0
0

I didn't find relevant terms in Order of evaluation.

So is the behavior of function g undefined in the code below?

int x;int f() { return x++; }void g() { x = f(); }

I compiled the code on different platform and with different args, and it showed that x always stayed unchanged.


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>