C++ template name mangling

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Sat Aug 16 15:16:13 PDT 2014


On 8/16/14, 11:55 AM, Jacob Carlborg wrote:
> On 2014-08-15 23:02, H. S. Teoh via Digitalmars-d wrote:
>
>> What would interfacing with C++ templates be like in practice? C++
>> templates have SFINAE, but D doesn't; so how would one translate a set
>> of C++ templates that rely on SFINAE to the equivalent D declarations
>> (inside extern(C++) blocks)?
>>
>> I hope we won't need to add SFINAE to extern(C++) blocks...
>
> Could template constraints help?

Like until now, extern(C++) code obeys D lookup rules but generates 
calls to C++ functions. -- Andrei


More information about the Digitalmars-d mailing list