On 11 July 2015 at 14:40, monolithed <[email protected]> wrote:

> ```c++
> #include <iostream>
>
> static int foo = 1;
>
> int bar (const int &foo) {
> ::foo = 2;
>
> return foo;
> }
>
> int main () {
> std::cout << foo << ',' << bar(1) << std::endl; // 2,1
>

(This looks like undefined behavior as the evaluation of "foo" and the
function call "bar(1)" are indeterminately sequenced.)

 return 0;
> }
> ```
>
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to