Specifying C++ symbols in C++ namespaces

bearophile bearophileHUGS at lycos.com
Fri Apr 4 14:39:00 PDT 2014


Tove:

> Why would we need new ways of declaring scopes in D? Overriding 
> the external mangling should be sufficient? If there are 
> collisions you can use any type of scope you prefer to avoid 
> the issue, modules, structs, templates, even functions or 
> blocks...
>
> void fun1() { extern (C++, S::T) int foo();}
> void fun2() { extern (C++, S::T::U) int foo();}
>
> extern (C++, S::T::U) int foo();
> struct test { extern (C++, S::T) int foo();}

This seems promising, but this idea needs to become simpler.

Bye,
bearophile


More information about the Digitalmars-d mailing list