C++11 lambdas

Stefan Schulz schulz at the-loom.de
Mon Mar 15 00:18:05 PDT 2010


Am 14.03.2010 22:00, schrieb Rémi Forax:
> Perhaps I'm wrong but the context after "call()"
> seem sufficient to disambiguate.
>
> call() a; // a declaration
> call();    // a method call

You are right, I was thinking out of context... I just find it to be not 
very visible (which might be fine, though).

Object() (a); // an expression lambda
Object() a;   // a function type declaration
Object() {Object a = create(); return a;}; // a block lambda
new Object() {Object a = create();};       // an anonymous class

Stefan


More information about the lambda-dev mailing list