Fix to Map caused by changes to hasSlicing.

import std.algorithm;
import std.range;

void main()
{
    auto N2 = sequence!"n"(cast(size_t)1).map!"a";
}

ceased to compile, because Map's opSlice won't work anymore over
infinite ranges, because the result can't be reassigned to the original.
This commit is contained in:
jmdavis 2012-10-10 00:27:53 -07:00
parent 0d9b31b594
commit 57ddea7cf2

View file

@ -451,7 +451,7 @@ private struct MapResult(alias fun, Range)
alias length opDollar;
}
static if (hasSlicing!R)
static if (!isInfinite!R && hasSlicing!R)
{
static if (is(typeof(_input[ulong.max .. ulong.max])))
private alias ulong opSlice_t;