[cfe-dev] blocks and lambdas

Sopl'Wang sopl.wang at gmail.com
Tue Feb 8 03:56:05 PST 2011

On 2011-2-8,10:33,James Gregurich <bayoubengal at mac.com> Wrote:

> What if you build your lambda structure around the existing block  
> structure such that the lambda type would have a copy constructor  
> that calls Block_copy? If the lambda has a type, it stands to reason  
> that it could have a copy constructor.

I think no need of Block_copy operation on C++0x lambda. C++0x support  
allocate lambda on heap directly.

You can write this:

auto lambda_on_heap = new auto([] {
   // your codes here

More information about the cfe-dev mailing list