[Issue 22608] RandomAccessInfinite is not a valid random-access range

d-bugmail at puremagic.com d-bugmail at puremagic.com
Sun Dec 19 02:48:17 UTC 2021


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

Dlang Bot <dlang-bot at dlang.rocks> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #2 from Dlang Bot <dlang-bot at dlang.rocks> ---
dlang/phobos pull request #8338 "Fix issue 22608 - RandomAccessInfinite is not
a valid random-access range" was merged into master:

- ce89dd9203f66588dea29e415840fd5659d79558 by Paul Backus:
  Fix issue 22608 - RandomAccessInfinite is not a valid random-access range

  Previously, isInfinite!(RandomAccessInfinite!T) would always evaluate to
  false, because the 'empty' method inherited from InputRange could not be
  evaluated at compile time. Since isRandomAccessRange!R requires
  (isBidirectionalRange!R || isInfinite!R), this meant that
  RandomAccessInfinite!T was not recognized as a random-access range.

https://github.com/dlang/phobos/pull/8338

--


More information about the Digitalmars-d-bugs mailing list