[cxx-abi-dev] C++17 mangling for result of lambda conversion function

Richard Smith richardsmith at googlers.com
Wed Oct 5 22:38:37 UTC 2016


On 5 October 2016 at 15:32, David Vandevoorde <daveed at edg.com> wrote:

>
> On Oct 5, 2016, at 5:43 PM, Richard Smith <richardsmith at googlers.com>
> wrote:
>
> On 5 October 2016 at 11:54, Hubert Tong <hstong at ca.ibm.com> wrote:
>
>> In N4604 subclause 5.1.5 [expr.prim.lambda] paragraph 7, the conversion
>> function to a pointer-to-function is constexpr.
>> This means that the resulting pointer-to-function may be used as a
>> template non-type argument and thus need a mangling.
>>
>> Clang currently mangles as a member of the closure type named __invoke,
>> and GCC seems to use _FUN in place of __invoke.
>> I find the Clang name to be less jarring.
>>
> I'd be fine with specifying either of these, or with some new custom
> mangling. I note that EDG uses the _FUN mangling, like GCC, but unlike GCC
> and Clang, does not make the name visible to class member name lookup.
>
>
> Except in our GNU and Clang C++ modes, where we do make the name visible
> ;-)  (Our Clang-mode behavior is accidental in this regard, though.)
>

We at least have the decency to make __invoke a private member ;-)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sourcerytools.com/pipermail/cxx-abi-dev/attachments/20161005/d1742b61/attachment-0001.html>


More information about the cxx-abi-dev mailing list