extern(C++, ns) is wrong
Danni Coy
danni.coy at gmail.com
Thu Sep 13 05:29:42 UTC 2018
On Thu, Sep 13, 2018, 07:06 Manu via Digitalmars-d <
digitalmars-d at puremagic.com> wrote:
> On Tue, 11 Sep 2018 at 20:59, Danni Coy via Digitalmars-d
> <digitalmars-d at puremagic.com> wrote:
> >
> >
> >
> > So my understanding is that the main issue with extern(C++,"ns") is
> functions that have different C++ name-spaces overriding each other in
> unexpected ways.
> > How feasible is to simply disallow functions/variables/objects/... with
> the same name but a different "ns" being in the same module?
>
> That's natural behaviour. You can't declare the same symbol twice in
> the same scope.
>
Sorry I meant in the instance where a function has the same name but a
different signature and the wrong function might be called because of
implicit promotion of a variable.
How feasible is it to have the compiler simply disallow this and force you
to put such functions in different d modules?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20180913/8dd303ed/attachment.html>
More information about the Digitalmars-d
mailing list