On Nov 2, 2011, at 10:19 AM, Douglas Gregor wrote:

> 
> 
>> Alternatively, we could just forbid the capturing of rvalue references. 
>> Let the user make an explicit choice by either creating a local copy or 
>> a local lvalue reference.
> 
> 
> This might just be the best solution, since the only seems that is clear is 
> that there are no clear semantics :)
> 
> Forcing users to perform the capture makes them choose between, e.g.,
> 
>       __block T captured_x = move(x);

Yes.

> 
> or
> 
>       __block T &captured_x = x;

Wouldn't you be passing down reference to the temporary to the block here? Or, 
does semantic of rvalue-reference requires a copy
being made here?

- Fariborz

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

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

Reply via email to