[cxx-abi-dev] Mangling C++0x Lambdas

David Vandevoorde daveed at edg.com
Wed Oct 28 19:16:55 UTC 2009


On Oct 27, 2009, at 7:04 PM, Jason Merrill wrote:

> The obvious change to make the op() of a [] lambda a static member  
> function changes the mangling, since the function is no longer  
> "const".


I don't think that you can make that change in general: One can form  
pointer-to-member constants for the closure's operator().

(The "Unified Function Syntax" proposal that intended to make it valid  
got shot down in Santa Cruz last week.)

	Daveed



>  And, of course, it changes the calling convention, since there's no  
> 'this' argument anymore, so I don't think it's worthwhile to add a  
> fake "const" to the mangling.
>
> It would be possible to leave it as a non-static member function and  
> have the conversion op return a helper function, but it seems early  
> to be locking down the lambda ABI.  We should also discuss closure  
> layout, particularly of capture by reference.
>
> Jason
>




More information about the cxx-abi-dev mailing list