Why extern variables and functions within template/struct/class have a D mangling

Dicebot m.strashun at gmail.com
Wed May 8 02:31:45 PDT 2013


On Wednesday, 8 May 2013 at 09:22:52 UTC, Andrej Mitrovic wrote:
> On 5/8/13, Dicebot <m.strashun at gmail.com> wrote:
>> On Wednesday, 8 May 2013 at 09:09:34 UTC, Andrej Mitrovic 
>> wrote:
>>> ...
>>
>> Suck code is invalid in C++ and for a good reason. I'd really
>> expect D to refuse to compile extern(C) functions it can't
>> possibly mangle correctly.
>>
>
> Sorry, I forgot I was actually thinking about *static* extern(C)
> functions. I'm not sure about methods.

static methods are illegal in C++ with extern(C) too. As well as 
any namespaced function. Or any function that has overloads.


More information about the Digitalmars-d mailing list