On Jun 24, 2011, at 8:17 PM, Eli Friedman wrote:
> On Fri, Jun 24, 2011 at 7:26 PM, John McCall <[email protected]> wrote:
>> Author: rjmccall
>> Date: Fri Jun 24 21:26:44 2011
>> New Revision: 133861
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=133861&view=rev
>> Log:
>> Do not apply the ARC move optimization to 'const'-qualified xvalues.
> 
> Why not?

The move optimization involves writing to the source object, which
is a violation of the const contract.  The analogous scenario with
non-POD classes would canonically cause a copy constructor to be
run, not a move constructor.

John.
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to