[Issue 13390] [REG2.066] std.range.cycle ctor fails when empty input passed

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Thu Aug 28 07:53:15 PDT 2014


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

--- Comment #3 from drug007 <drug2004 at bk.ru> ---
Yes, this is 2.066 regression.
Is it suitable decision instead of:

        this(R input, size_t index = 0)
        {
            _original = input;
            _index = index % _original.length;
        }

use this
        this(R input, size_t index = 0)
        {
            _original = input;
            _index = (_original.length) ? index % _original.length : 0;
        }

If yes I can make PR.

--


More information about the Digitalmars-d-bugs mailing list