extern(C++, NS)
Walter Bright via Digitalmars-d
digitalmars-d at puremagic.com
Mon Nov 30 09:51:08 PST 2015
On 11/30/2015 3:42 AM, Manu via Digitalmars-d wrote:
> Exactly, the D module system would still be in place. Assuming they
> were in defferent modules, then the D module system would keep them
> out of conflict naturally, with rules identical to the normal D rules.
> I imagined this;
No need to imagine:
"Namespaces create a new named scope that is imported into its enclosing scope."
-- http://dlang.org/spec/attribute.html#namespace
> C++ namespace is for mangling, D module is for
> scoping. That's not how it seems to be, so my intuition was dead
> wrong, but my weekend's experience has convinced me it would be better
> how I initially intuited.
What about:
file1.NS.X x;
file2.NS.Y y;
?
More information about the Digitalmars-d
mailing list