int x = 0; x = x++;violate the coding standards. C++ allows you to write it, but the definition of C++ says that the value of x is undefined after doing the second statement. Any statement that changes a variable more than once leads to undefined behavior. There are good reasons for the standards.