Skip to content
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

make cycle, splitter, roundRobin, and until compatible with RefRange #6935

Merged
merged 4 commits into from Mar 28, 2019

Conversation

aG0aep6G
Copy link
Contributor

Part of a series on issue 18657. Previously: #6346.
This concludes std.range and std.algorithm.searching. Everything else still needs to be checked.

Part of a series on issue 18657.
Part of a series on issue 18657.
Part of a series on issue 18657.
Part of a series on issue 18657.
@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @aG0aep6G! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the annotated coverage diff directly on GitHub with CodeCov's browser extension
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
18657 normal std.range and std.algorithm can't handle refRange

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub fetch digger
dub run digger -- build "stable + phobos#6935"

@thewilsonator
Copy link
Contributor

Apologies CircleCI is having problems and as its required I can't merge it, please ping me if I forget about this after it gets fixed.

@wilzbach
Copy link
Member

CircleCi fix is here: #6936 (should be in master soon)

@thewilsonator thewilsonator merged commit f7c573a into dlang:stable Mar 28, 2019
@WalterBright
Copy link
Member

@aG0aep6G @thewilsonator @wilzbach @andralex There's something seriously wrong if this wacky code is needed in every save() function. I strongly suggest stopping these changes until RefRange is re-evaluated as to why it is in Phobos if it breaks straightforward algorithms.

@aG0aep6G
Copy link
Contributor Author

aG0aep6G commented Mar 28, 2019

There's something seriously wrong if this wacky code is needed in every save() function.

It doesn't have to be done with move. It can also be done with a constructor like you did in #6900 and #6903. The only thing that matters is that opAssign is avoided. I did with move, because that seemed the least intrusive to me (doesn't touch the interface at all).

Or if you guys decide that ranges shouldn't do opAssign, then we can just remove it from RefRange and that's it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants