On Sunday, 8 April 2018 at 16:47:59 UTC, Patrick Schluter wrote:
On Sunday, 8 April 2018 at 10:03:33 UTC, kdevel wrote:
On Sunday, 8 April 2018 at 07:22:19 UTC, Patrick Schluter wrote:

To summarize: C++ works as expected and C prevents the assigment because the conditional operator does not yield an l-value:


Now, the only thing is to clearly define what it is in D, as apparently it is neither the C++ nor the C behaviour. The old precedence table on the D wiki seems to say it is like C, but the example of that thread seems to show it's not.

To follow up. What's surprizing for a C guy like me is that D accepts without problems


i.e. that (a=1) is a lvalue.

Reply via email to