-
-
Notifications
You must be signed in to change notification settings - Fork 740
Unseal containers #1857
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
Unseal containers #1857
Conversation
Oops, this duplicates a bunch of the work that I had in progress... but no matter. I'll review this. |
:( I was hoping you hadn't started any work yet. Sorry. Well, if you were almost done, you can submit your code and I can review too. I just wanted to see this go through, and I wasn't sure you were going to submit anything...
Thanks. |
@@ -306,7 +306,7 @@ Generally a container may define several types of ranges. | |||
assert(0); | |||
} | |||
/// Ditto | |||
@property T back() | |||
@property ref T back() |
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.
This is for developer documentation, so it should mention that ref
is optional.
lgtm modulo comments |
Comment addressed. I think. Is this what you had in mind? I also corrected the docs a bit: Some functions were missing, and others were outright wrong (arguments were incorrect). |
LGTM as well. Got bitten by this issue myself just today. |
Ping |
poke @andralex |
Pokity-ping @andralex . |
Auto-merge toggled on |
With Andrei being remarkably busy, I'm going on limb and auto-merging this. |
Yeah, too bad about that :/
Thanks :) |
See #1845 & https://d.puremagic.com/issues/show_bug.cgi?id=11889 .
Per @andralex and walter (http://forum.dlang.org/thread/mailman.281.1389340467.15871.digitalmars-d@puremagic.com#post-lap6dn:2483a:241:40digitalmars.com), this "unseals" containers.
@andralex , I think this is a more "correct" version of what you threw together in #1845 . I'm assigning it to you.
I ended up keeping the
move
family of functions because:a) Outright removing them would require the caller to have
std.range
imported to not break code.b) They can't be deprecated, as the deprecated function would have priority over the ufcs range overloads.
c) The range overloads would only work for the ranges, but not the containers themselves.
So I ended up doing nothing about it. It can't hurt anyone. Also, funny story,
DList
doesn't have them.