extern(C++, NS)

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun Nov 29 10:29:15 PST 2015


On 11/28/2015 8:40 PM, Manu via Digitalmars-d wrote:
> The trouble mostly appears in this situation:
>
> file1.d
>    extern(C++, NS) struct X;
>
> file2.d
>    extern(C++, NS) struct Y;
>
> file3.d
>    import file1, file2;
>    X x; // nope
>    Y y; // nope
>    NS.X x; // NS has multiple definitions...
>    NS.Y y; // NS has multiple definitions...

     file1.NS.X x;
     file2.NS.Y y;

works.



More information about the Digitalmars-d mailing list