Specifying C++ symbols in C++ namespaces

Marc Schütz" <schuetzm at gmx.net> Marc Schütz" <schuetzm at gmx.net>
Sun Apr 6 02:56:21 PDT 2014


On Saturday, 5 April 2014 at 21:43:03 UTC, Walter Bright wrote:
> On 4/5/2014 2:31 PM, Tove wrote:
>> How could this common pattern look?
>> std::string
>> boost::fun(std::string arg)
>>
>> alias cpp    = extern (C++, namespace = std);
>> alias boost = extern (C++, namespace = boost);
>>
>> cpp.string
>> boost.fun(cpp.string arg)
>>
>> ?
>
> extern (C++, namespace = std) {
>     struct string { ... }
> }
>
> extern (C++, namespace = boost) {
>     void fun(std.string arg);
> }

What would std be here from D's point of view? A module? Or a new 
kind of symbol?

And wouldn't it clash with D's std package?


More information about the Digitalmars-d mailing list