[cfe-dev] clang++ and Lambda expressions

Michael Price - Dev michael.b.price.dev at gmail.com
Sun Sep 12 05:43:42 PDT 2010


Lambdas use a slightly modified form of the new function declaration  
syntax.

There is also the issue of capturing lambdas in a variable. Since the  
type of a lambda is compiler generated (I believe) it will be most  
common to use the auto typename, which I have a patch for (I just  
haven't gotten around to writing the tests).

After auto, the function declaration syntax was next on my list, but I  
rarely have the time to work on it all.


On Sep 12, 2010, at 5:25 AM, Nicola Gigante <nicola.gigante at gmail.com>  
wrote:

> Hello.
>
> What are the plans to support the lambda expression c++0x feature in  
> clang? It's notable that VC2010 adds
> production-ready support for them.
> I'm trying to understand what would be needed to implement the new  
> feature. From my understanding, it will be
> simpler than the implementation of the blocks extension, since a  
> lambda expression simply declares and instantiate
> a kind of functor class (have I understood correctly?)
>
> If I'm correct, then the only two components affected by this new  
> feature are AST and Sema, and no changes are
> required to the lexer and the code generation stuff, right?
>
> So what actually needs to be done to support lambda expressions?
>
> Bye,
> Nicola
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev



More information about the cfe-dev mailing list