-
-
Notifications
You must be signed in to change notification settings - Fork 739
Supplemental changes of dmd/pull/41 #120
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -335,7 +335,7 @@ public: | |||
} | |||
|
|||
/// | |||
bool opEquals(Tdummy=void)(ref const BigInt y) const | |||
bool opEquals(Tdummy=void)(auto ref const BigInt y) const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As I understand it, you don't actually need the Tdummy=void
. Supposedly, ()
is enough to templatize the function (I haven't tried it though; I just know that David was doing it in some code). Assuming that that works, it would likely be preferable to having Tdummy
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the late reply. I had missed your comment.
I also think that Tdummy=void
is not needed. It might be the garbage of past template limitation.
I couldn't judge it, so keep codes as far as possible.
Ping? Please rebase so I can pull safely. Thanks! |
Unfortunately, we can't merge this until merging dmd/pull/41.
Then, it is necessary to apply changes to phobos and dmd at the same time. |
It would be great to fix this issue in the coming release. Kenji, could you please submit the bug? Walter, any chance we get a fix in the current beta? Thanks! |
I have already filed the bug as bug 5889, but Walter has a negative opinion against fixing it... |
@k-hara: This pull as is right now can be merged independently of dmd changes? |
I mean @9rnsr :o) |
@andralex: Still can't, unfortunately. We MUST merge dmd/pull/41 before this, to avoid conflict of ref/non-ref overload. |
@WalterBright: ping |
Supplemental changes of dmd/pull/41
Fails miserably at compiling phobos. |
std\file.d(2103): Error: overloads const pure nothrow bool(const(SysTime) rhs) and const pure nothrow bool(ref const(SysTime) rhs) both match argument list for opEquals |
@WalterBright, please read the summary. This pull is an additional fix of dmd/pull/41. |
BigInt, SList, and Array are struct, not class. Adding such attribute is better, but it's not related to the purpose of this pull. |
@WalterBright, Can you reopen this pull? If it isn't possible, I'll post a new pull exactly the same as this. |
I did pull 41 first. It does not compile phobos. |
Ouch! Sorry, dmd/pull/41 was silently broken by others pull. And sorry my irrelevant comment (I didn't noticed you already merged the two pulls). |
reverted for the moment, as well as pull 41. |
@WalterBright Could you please push the reverts then? |
I've posted a revert pull that contains a small fixup. Please merge #753. |
…-literal"" This reverts commit 8a6bfd2.
Revert "Revert "Merge pull request #120 from 9rnsr/rvalue-struct-literal""
dlang/dmd#41 makes struct literal and struct constructor call as rvalue, and passing them to ref parameter make invalid.
This pull request adds function overloads for ref and non-ref.
CAUTION: It is necessary to apply changes to phobos and dmd at the same time.