Bug 16628 – Special case std.algorithm.equal for known empty or infinite ranges

Status
RESOLVED
Resolution
FIXED
Severity
enhancement
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86
OS
Windows
Creation time
2016-10-20T11:12:00Z
Last change time
2017-01-07T03:02:24Z
Keywords
pull
Assigned to
nobody
Creator
nick

Comments

Comment #0 by nick — 2016-10-20T11:12:20Z
* If one of the ranges has `Range.empty == true`, we can define `equal` even when each `front` is not comparable. * If one range is known to be infinite and the other defines `length`, return false. * If both are known to be infinite, cause a compile-time error. PR pending.
Comment #1 by github-bugzilla — 2016-10-30T23:11:41Z
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
Comment #2 by github-bugzilla — 2017-01-07T03:02:24Z
Commits pushed to stable 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 https://github.com/dlang/phobos/commit/31dad0c099f33b5c584d24ed739e8e5785b71426 Merge pull request #4871 from ntrel/equal-empty-enum