DIP61: redone to do extern(C++,N) syntax

Temtaime via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 28 00:45:18 PDT 2014


I think he meant next:

A.d:
void foo();

A.cpp:
namespace A { void foo(); }

And now we has:

exnern(C++, A) void foo();
import A;

void main() {
A.foo(); // which foo will be called ? how to call d version or 
c++ ?
}

There's no linker problem because D and C++ has different name 
mangling.


More information about the Digitalmars-d mailing list