Is there any good reason why C++ namespaces are "closed" in D?
Walter Bright
newshound2 at digitalmars.com
Sun Jul 29 07:45:35 UTC 2018
On 7/28/2018 9:23 PM, Manu wrote:
> Don't troll me on this one, this is a very sensitive topic!
> I could have a legit mental breakdown ;)
Here's another method:
------
extern (C++, ns) { int foo() { return 1; } }
mixin template X()
{
extern (C++, ns) { int bar() { return 2; } }
}
mixin X!() x;
-------
and another:
-----
extern (C++, ns) { int foo() { return 1; } }
struct S
{
extern (C++, ns) { int bar() { return 2; } }
}
----
More information about the Digitalmars-d
mailing list