On 9 Dec 2016 8:14 am, "Nathan Sidwell" <[email protected]> wrote:
On 12/09/2016 09:29 AM, Jason Merrill wrote: > On Thu, Dec 8, 2016 at 5:31 PM, Richard Smith <[email protected]> > 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. I would expect just UlT_T_E (modulo substitutions), as we don't generally mangle template parameter lists, just template argument lists, and we don't have a template argument list here. (But it doesn't really matter what we put between the Ul and the E, since we number closure types in the event of collisions anyway.) nathan -- Nathan Sidwell
_______________________________________________ cxx-abi-dev mailing list [email protected] http://sourcerytools.com/cgi-bin/mailman/listinfo/cxx-abi-dev
