Specifying C++ symbols in C++ namespaces

bearophile bearophileHUGS at lycos.com
Wed Apr 2 18:27:56 PDT 2014


Walter Bright:

> I considered that, but it fails because:
>
> C++:
>
>     namespace S { namespace T {
>         int foo();
>         namespace U {
>             int foo();
>         }
>      } }
>
> D:
>
>   extern (C++, S.T) {
>       int foo();
>       extern (C++, U) {
>         int foo();
>       }
>   }
>   foo();  // error, ambiguous, which one?
>   S.T.foo(); // S undefined

Then is the idea of "extern(C++) module" by Xiaoxi usable in some 
way?

Bye,
bearophile


More information about the Digitalmars-d mailing list