Message from C, C++ discussions
November 2019
โ I've just found out that your code has undefined behaviour. Initialize output to 1;
I'll give you a solution. It's the fully generalized version for C++20 (I did it for fun), so it may not fit your purpose:
https://godbolt.org/z/5m263Z
โ Hello
โ Ohhh okay. Thank You sir ๐
โ Yh
โ And does the right to left precedence holds true even for function call?fun(x++, ++x);
Or is it still UB in C++17?
โ Left and right does apply in regards to the assignment operator [expr.ass].
For function calls in c++ C++17 it's no longer undefined behavior but it's unspecified instead.
From [expr.call] "The initialization of a parameter, including every associated value computation and side effect, is indeterminately sequenced with respect to that of any other parameter."
โ Explanation pls
โ Hello house, please I need a strong and comprehensive ebook on c++
โ ไฝใงใใ๏ผ
โ Undefined or unspecific behavior
โ English only