[cfe-dev] Proposed C++ optimization with big speed gains with big objects

Jean-Daniel Dupas devlists at shadowlab.org
Wed Sep 26 02:48:18 PDT 2012


Le 25 sept. 2012 à 18:26, Ladislav Nevery <neuralll at gmail.com> a écrit :

> int a=1;
> a=2;
> 
> The moment I agreed to assign new value I agreed to old value being lost.
> This is normal and expected behavior. 

Me too, but when I write 

arr[0] = Obj();

I expect the assignment be performed after the constructor invocation, so if it failed, I expect no assignment, so nothing lost.

-- Jean-Daniel








More information about the cfe-dev mailing list