[cxx-abi-dev] Mangling sizeof

John H. Spicer jhs at edg.com
Sun Mar 8 19:32:51 UTC 2009


On Mar 8, 2009, at 1:06 PM, Doug Gregor wrote:

>
>
>> And finally,
>> * lambda
>>
>> Completely mangling lamba expressions in sizeof/decltype/alignof  
>> would mean
>> having to mangle arbitrary statements as well, which seems rather a  
>> bridge
>> too far.
>
> Yes, it does. I suggest that we consider all lambda expressions with
> the same parameter type lists and return type (if provided) to be
> "functionally equivalent". That way, we need only mangle the lambda's
> call signature and not its body.
>
> And, although it doesn't have any direct impact on the ABI, I think we
> also need to say that failures substituting into the body of a lambda
> are not substitution failures.

I'm not sure what you mean by this.    Do you mean you don't  
substitute into a lambda body and if you select the function you get a  
hard error?

Is there any reason not to just say that doing substitution on an  
lambda expression results in a substitution failure?  In other words,  
something like:

template <class T> void f(T, decltype([](T t){ /* something */ }* t){}

would not be callable?

John.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20090308/3e550dec/attachment.html>


More information about the cxx-abi-dev mailing list