extern(C++, ns)

Daniel Murphy via Digitalmars-d digitalmars-d at puremagic.com
Sat Jan 16 06:26:47 PST 2016


On 13/01/2016 5:51 PM, Walter Bright wrote:
>
> If you like:
>
>      extern (C++) {
>          int a;
>          extern (C++,ns) {
>              int a;
>          }
>      }
>
> The whole point of scoped names is to be able to do this.
>

The whole point is meant to be linking to C++ symbols inside namespaces. 
  Nobody wants conflicting symbols in a module, and nobody wants to cram 
all of their C++ namespace bindings inside a single D source file to 
avoid getting namespace symbol conflicts.


More information about the Digitalmars-d mailing list