mirror of
https://github.com/dlang/phobos.git
synced 2025-04-29 06:30:28 +03:00
Remove TLS variables from ReduceSeedType
This commit is contained in:
parent
1f249eaf13
commit
c06c1e5a17
1 changed files with 3 additions and 3 deletions
|
@ -2844,12 +2844,12 @@ private template ReduceSeedType(E)
|
|||
{
|
||||
import std.algorithm.internal : algoFormat;
|
||||
|
||||
E e = E.init;
|
||||
static alias ReduceSeedType = Unqual!(typeof(fun(e, e)));
|
||||
alias ReduceSeedType = Unqual!(typeof(fun(lvalueOf!E, lvalueOf!E)));
|
||||
|
||||
//Check the Seed type is useable.
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue