On Thursday, 14 July 2016 at 18:49:36 UTC, Steven Schveighoffer wrote:
If what you wrote is UB (as it is in D), then the compiler can go ahead and assign 5 to y.

In C++, the compiler has to reload x, because it may have changed.

Someone explained this to me recently on the NG.

-Steve

Thanks, so when people say "C++ defines the behavior of modifying const" what they really mean is "C++ defines const as meaningless."

Reply via email to