[Issue 16628] Special case std.algorithm.equal for known empty or infinite ranges

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Sun Oct 30 16:11:41 PDT 2016


https://issues.dlang.org/show_bug.cgi?id=16628

--- Comment #1 from github-bugzilla at puremagic.com ---
Commits pushed to master at https://github.com/dlang/phobos

https://github.com/dlang/phobos/commit/2a45a145e8d29bf0f4a12c8fc8296041e475ea60
Fix Issue 16628 - std.algorithm.equal for known empty or infinite ranges

* If one of the ranges has `Range.empty == true`, we can define `equal`
  even when each `front` is not comparable.
* If one range is infinite and the other defines `length`, return false.
* If both are infinite, cause a compile-time error.

https://github.com/dlang/phobos/commit/31dad0c099f33b5c584d24ed739e8e5785b71426
Merge pull request #4871 from ntrel/equal-empty-enum

Fix Issue 16628 - std.algorithm.equal for known empty or infinite ranges

--


More information about the Digitalmars-d-bugs mailing list