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

Steven Schveighoffer via Digitalmars-d digitalmars-d at puremagic.com
Mon Apr 28 06:47:42 PDT 2014


> This is close. Forgive inaccurate syntax, but I see at least these  
> issues that will make namespaces/module-system broken in terms of  
> maintenance:
>
> YEAR 2014:
>
> framework1.d:
> extern (C++, std){ void something(); }
>
> framework2.d:
> extern (C++,std){void something(); void anything();}
>
> application.d:
> import framework1;
> import framework2;
> … std.something(); // is this ok, because the extern signatures match?

Not ok. This is like having 2 definitions for the same function, linker  
will not accept that.

-Steve


More information about the Digitalmars-d mailing list