[cxx-abi-dev] Mangling of generic lambda

Nathan Sidwell nathan at acm.org
Fri Dec 9 16:14:16 UTC 2016


On 12/09/2016 09:29 AM, Jason Merrill wrote:
> On Thu, Dec 8, 2016 at 5:31 PM, Richard Smith <richardsmith at googlers.com> wrote:

>> Of note is the repeated suggestion to allow explicit template parameter
>> lists in lambdas (at this point, I'd give this a very solid chance of being
>> part of C++20):
>>
>>   auto lambda = []<typename T>(T a, T b) {};
>>
>> We would presumably need to mangle that as UlT_T_E even with the Da
>> suggestion, so it seems that demanglers are just going to need to cope with
>> Ul introducing a new template parameter scope.
>
> Makes sense.

I think the ABI doc should at least mention that uses of 'auto' in a 
generic lambda's parameter list are mangled as the artificial template 
they're represented as (as that seems to be the intent)

Anyway, how do we expect the above example to be mangled as?  Something 
like 'UlI...ET_T_E_'?  I.e. are the explicit template args in that 
suggestion distinguished from synthesized 'auto' ones?  It'd be 
unfortunate if the mangling we have right now blocked something needed 
later.

nathan
-- 
Nathan Sidwell


More information about the cxx-abi-dev mailing list