On 03/29/2014 05:31 PM, Frustrated wrote:
.. i++, even in an assignment, increments i.
...

TDPL specifies the behaviour of i++ as follows:

{auto tmp=i; ++i; return tmp;}();

i = j++;
...

i = {auto tmp=i; ++j; return tmp;}();

even if i is assigned the previous value of j, j STILL gets incremented
by one.

Change i to j and it will work out.
...

i = {auto tmp=i; ++i; return tmp;}();

Reply via email to