[cfe-commits] r143399 - in /cfe/trunk: lib/CodeGen/CGBlocks.cpp lib/CodeGen/CGExpr.cpp test/CodeGenCXX/block-rvalue-reference-capture.cpp
fjahanian at apple.com
Wed Nov 2 10:57:31 PDT 2011
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);
> __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?
> - Doug
> cfe-commits mailing list
> cfe-commits at cs.uiuc.edu
More information about the cfe-commits