extern(C++, ns)

Chris Wright via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 17 17:19:57 PST 2016


On Sun, 17 Jan 2016 22:55:23 +1100, Daniel Murphy wrote:

> So now we have two public symbols called 'mylib', and because they
> conflict they can't be used to disambiguate eg 'someotherlib.funca' with
> 'library.a.funca'.

Users want to disambiguate between a use of C++ namespace members and 
other values from other modules. The natural way to do this is to provide 
a fully qualified D name. For instance, if I wrapped C++ type 
Urho3D::Core::Context in D module urho3d.core, I'd normally refer to it 
as urho3d.core.Context.

That works today. It's got no problems.

However, in your scenario, users don't want to use the D module names to 
disambiguate. They want to use C++ namespaces. Why?


More information about the Digitalmars-d mailing list