[Issue 13009] [REG2.064] inout overload conflicts with non-inout when used via alias this
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Sun Oct 26 10:59:57 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13009
monarchdodra at gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |monarchdodra at gmail.com
--- Comment #8 from monarchdodra at gmail.com ---
(In reply to Martin Nowak from comment #6)
> (In reply to Vladimir Panteleev from comment #5)
> > I don't, RefCounted does.
>
> And why? Shouldn't inout just do the trick?
Yes and no. There shouldn't be overloads. The reason there is a (conditional)
mutable version is so that "autoInitialize.Yes" can mutate to create an
instance.
That said, I think that when you have "autoInitialize.Yes", there should be no
inout version at all, since inout *can't* mutate the RefCounted to do said
initialization.
The conclusion is that while both mutable/inout version are needed, both should
be mutually exclusive, and noone should ever see it overloaded.
(In reply to Vladimir Panteleev from comment #7)
> Probably. monarchdodra is planning to fix this:
> https://github.com/D-Programming-Language/phobos/pull/2011#issuecomment-
> 55572141
Not anymore. No time.
--
More information about the Digitalmars-d-bugs
mailing list