S
saurabh gupta
Hello All,
I have a question regarding the ternary operator usage in C and C++.
If I write,
-----------------
a = (a==9) ? 10 : 0; // a is an integer defined
already
----------------------------------------
Is the ternary operator statement atomic across all platforms. By
atomic, i mean can it be guaranteed that while this statement is being
executed, context will not be switched between multiple threads in the
same process space. Is there any such mention in the C/C++ standard,
Or it is compiler dependent.
Thanks,
Saurabh Gupta
I have a question regarding the ternary operator usage in C and C++.
If I write,
-----------------
a = (a==9) ? 10 : 0; // a is an integer defined
already
----------------------------------------
Is the ternary operator statement atomic across all platforms. By
atomic, i mean can it be guaranteed that while this statement is being
executed, context will not be switched between multiple threads in the
same process space. Is there any such mention in the C/C++ standard,
Or it is compiler dependent.
Thanks,
Saurabh Gupta