Remove TLS variables from ReduceSeedType

This commit is contained in:
Jakob Øvrum 2016-01-12 12:40:23 +09:00
parent 1f249eaf13
commit c06c1e5a17

View file

@ -2844,12 +2844,12 @@ private template ReduceSeedType(E)
{ {
import std.algorithm.internal : algoFormat; import std.algorithm.internal : algoFormat;
E e = E.init; alias ReduceSeedType = Unqual!(typeof(fun(lvalueOf!E, lvalueOf!E)));
static alias ReduceSeedType = Unqual!(typeof(fun(e, e)));
//Check the Seed type is useable. //Check the Seed type is useable.
ReduceSeedType s = ReduceSeedType.init; ReduceSeedType s = ReduceSeedType.init;
static assert(is(typeof({ReduceSeedType s = e;})) && is(typeof(s = fun(s, e))), static assert(is(typeof({ReduceSeedType s = lvalueOf!E;})) &&
is(typeof(lvalueOf!ReduceSeedType = fun(lvalueOf!ReduceSeedType, lvalueOf!E))),
algoFormat("Unable to deduce an acceptable seed type for %s with element type %s.", fullyQualifiedName!fun, E.stringof)); algoFormat("Unable to deduce an acceptable seed type for %s with element type %s.", fullyQualifiedName!fun, E.stringof));
} }
} }