extern(C++, ns)

Walter Bright via Digitalmars-d digitalmars-d at puremagic.com
Sun Jan 17 19:58:35 PST 2016


On 1/17/2016 6:16 PM, jmh530 wrote:
> On Sunday, 17 January 2016 at 19:47:46 UTC, Walter Bright wrote:
>>
>> and yes, M.X.fooa() will wind up referring to the same externally defined
>> symbol X::fooa() as N.X.fooa().
>>
>
> Just for clarification.
>
> Suppose instead of file2 having fooa, it has foob, so there is no conflict
> within X as to the names. Even in this case, I would have to call fooa and foob
> with M.X.fooa() and N.X.foob(). I couldn't use X.fooa() and X.foob(). However,
> suppose only file1 exists. Then, I could call fooa as X.fooa() or M.X.fooa().

Yes. Or, in the last case, even just fooa().


More information about the Digitalmars-d mailing list