extern(C++, NS)
deadalnix via Digitalmars-d
digitalmars-d at puremagic.com
Sun Nov 29 20:31:35 PST 2015
On Sunday, 29 November 2015 at 18:29:14 UTC, Walter Bright wrote:
> 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.
Why not produce something similar to an overload set for C++
namespace ? An error needs to be issued only if X or Y is
duplicated, otherwise, this is fine.
More information about the Digitalmars-d
mailing list